Be the first user to complete this post
|Add to List
What does npm start do in nodejs
When you issue the command
npm start from the root directory of your nodejs project, node will look for a
scripts object in your
package.json file. If found, it will look for a script with the key
start and run the command specified as its value.
package.json does not have any
scripts object or if the scripts object does not have a
start key, it will run the command
node server.js instead.
Npm scripts are pretty useful because they let you group together and run logically related commands. e.g. linters, minifiers etc.
If you are unfamiliar with package.json, here's a nifty little interactive explanation of its different parts. Check it out!
- Setup passportjs for local authentication and authorization using expressjs
- set the default node version using nvm
- Understanding expressjs middleware with a visual example
- Understanding routers in express 4.0 - Visually
- What is an npmignore file and what is it used for
- Unit test your Nodejs RESTful API using mocha
- Accessing the request body and session in nodejs using express
- gzip compress and cache api response in express