Full series: Building website with Nodejs - A post from my experience
Previous post: Install and Create basic structure for Nodejs website
package.json file
package.json
file is used for storing information about your application as
well as its dependencies. Usually, when managing your Nodejs application with
git, you should ignore the node_modules folder (which contains all the
dependencies). Instead, you can specify the library that your app use and then
let npm install it automatically for you with npm install
. Here is the default
package.json file generated by express
You don’t even need to specify the dependencies manually. When you install any
new package with npm, just add --save
flag so that npm will update the
package.json file automatically for you. For example