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

제 3자 패키지 설치

라이브러리 들은 npm Repository 에 있슴

https://www.npmjs.com/

developmen package

npm install nodemon --save-dev

production dependancy

npm install nodemon --save

anywhere

npm install nodemon -g