Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Update middleware for body parsing in Express MEAN configuration
Browse files Browse the repository at this point in the history
- update Express middleware configuration
- remove reference and documentation to bodyParser middleware
- add middleware for json/urlencoded requests
- Fixes #136 on MEAN linnovate/mean
  • Loading branch information
peterblazejewicz committed Nov 17, 2013
1 parent 390c9c9 commit ad95ea3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions config/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ module.exports = function(app, passport, db) {
//cookieParser should be above session
app.use(express.cookieParser());

//bodyParser should be above methodOverride
app.use(express.bodyParser());
// request body parsing middleware should be above methodOverride
app.use(express.urlencoded());
app.use(express.json());
app.use(express.methodOverride());

//express/mongo session storage
Expand Down

0 comments on commit ad95ea3

Please sign in to comment.