Node js post request forver loading

Every time I make a post request, the page just loads forever and the DB remains unfilled. Where am I going wrong? Cause it had worked the first time around, now it’s just forever loading.

server file:"/compose", function (req, res) {
  const day = date.getDate();

  const newNote = new Note({
    title: req.body.title,
    subtitle: req.body.subtitle,

    categories: req.body.category,

    thesis: req.body.thesis,
    note: req.body.note,
    summary: req.body.summary,

    dateCreated: day,
    googleId: req.user.googleId
  }); {
    if (!err) {


view file:

    <form class="" action="/compose" method="POST">
      <div class="form-group">
        <input class="form-control" type="text" name="title">
     other inputs and labels..

      <button class="btn btn-primary" type="submit" name="button">Publish</button>