I have this as configuration of my Express server
app.use(app.router); app.use(express.cookieParser()); app.use(express.session({ secret: \"keyboard cat\" }
You can try adding this line of code at the top, (after your require statements):
app.use(bodyParser.urlencoded({extended: true}));
As for the reasons as to why it works, check out the docs: https://www.npmjs.com/package/body-parser#bodyparserurlencodedoptions