Back-end/웹(web)
nodejs 프레임워크 express 로 서버 설치, 설정
javapp 자바앱
2020. 9. 22. 00:00
728x90
https://expressjs.com/en/starter/installing.html
Installing Express
Installing Assuming you’ve already installed Node.js, create a directory to hold your application, and make that your working directory. $ mkdir myapp $ cd myapp Use the npm init command to create a package.json file for your application. For more inform
expressjs.com
Installing
종료는 ctrl + c
커멘드에서 서버 실행시 서버 수정이 있으면 껐다가 다시 켜야한다.
이를 자동으로 껐다 켜주는 기능을 해주는 supervisor 를 쓰는 것을 추천.
(코드 수정시 자동으로 웹페이지 수정)
www.npmjs.com/package/supervisor
supervisor
A supervisor program for running nodejs programs
www.npmjs.com
npm install supervisor -g //-g : 글로벌, 컴퓨터 전역
supervisor main.js
종료는 ctrl + c