vue.js – express로 frontend, backend 연동하기 예제
작업 디렉토리 생성 $ mkdir example 프론트엔드와 백엔드 작업을 하게 될 작업디렉토리를 생성한다. Frontend 작업디렉토리 생성 및 front 서버 실행 $ npm install -g yarn $ npm install -g @vue/cli…
0 Comments
March 29, 2020
작업 디렉토리 생성 $ mkdir example 프론트엔드와 백엔드 작업을 하게 될 작업디렉토리를 생성한다. Frontend 작업디렉토리 생성 및 front 서버 실행 $ npm install -g yarn $ npm install -g @vue/cli…
node.js 설치 node.js 최신 패키지를 wget 명령으로 다운로드하고 dpkg로 설치한다. $ sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb $ sudo dpkg -i node_latest_armhf.deb express 설치 $ npm install -g express $ npm install…
참고 : http://cooldragon.tistory.com/124 node.js에서 다음과 같은 put function을 구현하였다. 간단히 전달 받은 status를 출력하는 function이다. router.put('/', function(req, res) { var status = req.body.status; console.log("status : " + status); res.send();…