1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1 1 1 2 2 2 | 'use strict'; var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); module.exports = function (app) { // Important to have this before any session middleware // because what is a session without a cookie? // No session at all. app.use(cookieParser()); // Parse our POST and PUT bodies. app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); }; |