Skip to content

Instantly share code, notes, and snippets.

@janily
Forked from 1Marc/express-2-to-4-x.txt
Created April 9, 2016 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janily/0da7164643e3560fb82e41ad774b2a7e to your computer and use it in GitHub Desktop.
Save janily/0da7164643e3560fb82e41ad774b2a7e to your computer and use it in GitHub Desktop.
Express 2 to Express 4.x
Express 2 was used in the course and the current version is 4.x.
you can't just use 'urlencoded' anymore, you have to:
npm install body-parser
and
var bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({ extended: true }));
rather than
app.use(express.urlencoded());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment