Express.js POST req.body empty
You need bodyParser.json as well:
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
Sometimes the req.body shows {} if you forgot to put the name attribute to the form input fields. Following is an example:
<input type="email" name="myemail" class="form-control" id="exampleInputEmail2" placeholder="Email address" required>
Then the req.body shows { myemail: '[email protected]' }
I post this answer because, i have encountered the similar problem and this worked for me.