Saturday 18 August 2018

Nodejs tip of the day. Using scripts in package.json

In your package.json file, there is a section called scripts.Inside, you can add your own scripts. The most common one is "start" script.You can specify any regular terminal commands over there.Like in this picture when you type "npm start" in the terminal, it will run "node server.js"When you have custom commands, such as the second command "dev" you can type in "npm run dev"P.S: nodemon is another package which let's you keep the server running.https://ift.tt/2wemtzl

Submitted August 18, 2018 at 03:01PM by tamalweb

No comments:

Post a Comment