All Node applications will start with a
package.json
file so let’s begin with that.
{
"name": "starter-node-angular",
"main": "server.js",
"dependencies": {
"express" : "~4.5.1",
"mongoose" : "~3.8.0",
"body-parser" : "~1.4.2",
"method-override" : "~2.0.2"
}
}
That’s it! Now our application will know that we want to use Express and Mongoose.
INSTALL NODE MODULES
To install the dependencies we just setup, just go into your console and type:
npm install
You’ll see your application working to bring in those modules into the node_modules
directory that it creates.
Now that we have those, let’s set up our application in
server.js
Comments
Post a Comment