반응형
node를 쓰다보면
저장할 때마다 서버를 새로켜야 하는 불편함이 있었다.
이를 해결할 수 있는 패키지가 있는데 바로 nodemon이다.
https://www.npmjs.com/package/nodemon
nodemon
Simple monitor script for use during development of a Node.js app.. Latest version: 2.0.22, last published: 2 months ago. Start using nodemon in your project by running `npm i nodemon`. There are 4546 other projects in the npm registry using nodemon.
www.npmjs.com
설치후 사용하면 된다.
npm i nodemon
실행
nodemon index.js
이제 소스 수정 후 저장할 때마다 node가 자동 재실행 된다.
반응형
'nodejs' 카테고리의 다른 글
[node.js / express] ejs 보간(Interpolation) 구문, 템플릿에 데이터 전달 (0) | 2023.05.11 |
---|---|
[node.js / express] 템플레이팅 (ejs, __dirname, path.join()) (0) | 2023.05.10 |
[node.js / express] 쿼리 문자열 (0) | 2023.05.08 |
[Node.js] express 라우팅 기초(get 요청, post 요청) (0) | 2023.05.03 |
[node.js] express 시작 (0) | 2023.05.03 |