following code is to generate a web form using html,expressJS and save submitted details in mongodb but there is 'post' error and 'get' works following code is to generate a web form using html,expressJS and save submitted details in mongodb but there is 'post' error and 'get' works mongoose mongoose

following code is to generate a web form using html,expressJS and save submitted details in mongodb but there is 'post' error and 'get' works


There are two issues that I see here:

  1. The form field name is 'userName' but the mongoose model field name is 'username'

  2. The address textarea does not have a name attribute (name="address"), so it's not submitted in the form.