-
NodemonStudy/Node, React 기초 강의_John Ahn 2023. 2. 14. 00:14
Nodemon이란?
소스를 변경할 때 그걸 감지해서 자동으로 서버를 재 시작해주는 툴이다.
Visual Studio Code의 콘솔창에 명령어를 입력해 Nodemon을 설치한다.
npm install nodemon --save-dev
< 결과 >
Nodemon을 이용하여 index.js를 실행하기 위해 package.json에 코드를 추가한다.
{ "name": "boilerplate", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "start": "node index.js", "backend": "nodemon index.js", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "d-_-s", "license": "ISC", "dependencies": { "body-parser": "^1.20.1", "express": "^4.18.2", "mongoose": "^6.9.1" }, "devDependencies": { "nodemon": "^2.0.20" } }
'Study > Node, React 기초 강의_John Ahn' 카테고리의 다른 글
Bcrypt를 이용한 비밀번호 암호화 (0) 2023.02.19 비밀 설정 정보 관리 (0) 2023.02.19 BodyParser & PostMan & 회원 가입 기능 (0) 2023.02.13 SSH를 이용하여 GITHUB 연결 (0) 2023.02.13 Git과 Visual Studio 연동 (0) 2023.02.13