Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

Commit

Permalink
Fix for issue #615
Browse files Browse the repository at this point in the history
  • Loading branch information
smurfpandey committed Oct 24, 2014
1 parent a42af21 commit f159143
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chapters/05-exercise-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,8 @@ Create a file called `package.json` in the root of your project. It should look
"dependencies": {
"express": "~3.1.0",
"path": "~0.4.9",
"mongoose": "~3.5.5"
"mongoose": "~3.5.5",
"body-parser": "~1.9.1"
}
}

Expand All @@ -416,6 +417,7 @@ Your folder structure should look something like this:
```
node_modules/
.bin/
body-parser/
express/
mongoose/
path/
Expand All @@ -435,6 +437,7 @@ Create a file named server.js in the project root containing the following code:
// Module dependencies.
var application_root = __dirname,
express = require( 'express' ), //Web framework
bodyParser = require('body-parser'); //Parser for reading request body
path = require( 'path' ), //Utilities for dealing with file paths
mongoose = require( 'mongoose' ); //MongoDB integration

Expand All @@ -443,6 +446,7 @@ var app = express();

//Where to serve static content
app.use( express.static( path.join( application_root, 'site') ) );
app.use(bodyParser());

//Start server
var port = 4711;
Expand Down

0 comments on commit f159143

Please sign in to comment.