How can I easily get access to form data in Express js?

You should install body-parser through npm-install. Now it comes as a separate middleware. After that add following line in your app.js var bodyParser = require(‘body-parser’); app.use(bodyParser.json()); app.use(bodyParser.urlencoded()); // in latest body-parser use like below. app.use(bodyParser.urlencoded({ extended: true })); It parses the post request as an object. You will get your variables in req.body. In your … Read more