I tried to receive the input value from the user through form request using express handlebars. I get the following error.
TypeError: Cannot read property 'personname' of undefined
The following pictures contain the code snippets
Please Help me to resolve the issue
Express won't parse req.body
for you by default. You need middleware, preferably body-parser
const app = require('express')()
const bodyparser = require('body-parser')
app.use(bodyparser.json());
app.use(bodyparser.urlencoded({extended: true}));