NPM(node package manager)
npm init
{
"devDependencies": {
"@types/node": "^20.10.4"
},
"name": "node_practice",
"description": "practice node.js",
"version": "1.0.0",
"main": "app.js",
"dependencies": {
"undici-types": "^5.26.5"
},
"scripts": {
"test": "echo \\"Error: no test specified\\" && exit 1",
"start": "node app.js",
"start_server": "node app.js"
},
"author": "",
"license": "ISC",
"repository": {
"type": "git",
"url": "git+https://github.com/bradjjc/practice_node.git"
},
"bugs": {
"url": "<https://github.com/bradjjc/practice_node/issues>"
},
"homepage": "<https://github.com/bradjjc/practice_node#readme>"
}
"scripts" 에 start": "node app.js"
를 넣으면 npm start 로 실행가능 하지만 "start_server": "node app.js” 를 실행할려면
npm run start_server
라이브러리 들은 npm Repository 에 있슴
npm install nodemon --save-dev
npm install nodemon --save
npm install nodemon -g