xxxxxxxxxx
------------------package.json FILE
"scripts": {
"start": "node index.js",
"dev": "nodemon index.js"
},
------------------package.json FILE
------------------[console]
npm run dev
------------------[console]
xxxxxxxxxx
# Install nodemon
npm install nodemon
# Install nodemon globally on your machine
npm install -g nodemon
# Install nodemon on your project as dev-dependency
npm install nodemon --save-dev
xxxxxxxxxx
# Install nodemon
npm i nodemon
# Write a script like ...
"scripts": {
"start":"nodemon index.js"
}
# Start in your terminal with something like ...
nodemon ./server.js localhost 8000
or
npm run server
xxxxxxxxxx
// globally install nodemon
npm install -g nodemon
// modify package > script for easily use
"start": "node index.js", // replace index.js by your file-name
"start-dev": "nodemon index.js",
xxxxxxxxxx
# Install nodemon
npm install nodemon
# Install nodemon globally on your machine
npm install -g nodemon
#
nodemon index.js
# Install nodemon on your project as dev-dependency
npm install nodemon --save-dev
xxxxxxxxxx
"scripts": {
"start": "node ./bin/www",
"devstart": "nodemon ./bin/www",
"serverstart": "DEBUG=express-locallibrary-tutorial:* npm run devstart"
},