title: Registration page should be route on /auth/register and display the message but it isn't getting redirected
body: <p>I am creating a registration page but I'm having a problem after submitting. The page is not getting redirected and the page keeps loading until I refresh the page. I want it to be route on  <code>/auth/register</code> and display the message</p>
  <p>server.js page</p>
  <pre><code>var express = require(&quot;express&quot;);
  var mysql = require(&quot;mysql&quot;);
  var app = express();
  var path = require(&quot;path&quot;); 
  var port = 8080;
  
  app.use(express.urlencoded({extended:false}));
  app.use(express.json());  
  app.set(&quot;view engine&quot; , &quot;hbs&quot;);
  
  const routes = require(&quot;./routes/register.js&quot;);
  app.use(&quot;/&quot; ,routes);
  app.use(&quot;/auth&quot; , require(&quot;./routes/auth.js&quot;));   
  app.listen(port);
  
              
              
  </code></pre>
  <p>index.hbs</p>
  <pre><code>&lt;form action=&quot;/auth/register&quot; method=&quot;POST&quot;&gt;
      Name : &lt;input type=&quot;text&quot; name=&quot;name&quot;&gt;
      Mobile :&lt;input type=&quot;text&quot; name=&quot;mobile&quot;&gt;
      Password :&lt;input type=&quot;password&quot; name=&quot;password&quot;&gt;
      &lt;button class=&quot;saveBtn finModBtn&quot; id=&quot;regConfirm&quot;&gt;Confirm&lt;/button&gt;
      &lt;button class=&quot;closeBtn finModBtn&quot; id=&quot;regCancel&quot;&gt;Cancel&lt;/button&gt;
  &lt;/form&gt;
          
  </code></pre>
  <p>Routing pages</p>
  <p>auth.js</p>
  <p>After submitting, I want the message to be displayed on this page:</p>
  <pre><code>const express = require(&quot;express&quot;);
  const router = express.Router();
  var authController = require(&quot;../controller/auth.js&quot;);    
  
  router.post(&quot;/register&quot; , function(req,res){
      authController.register;
  });
  
  module.exports = router;
          
          
  </code></pre>
  <p>controller page</p>
  <p>auth.js controller file</p>
  <pre><code>exports.register = function(req,res){
      console.log(req.body);
      res.send(&quot;form submitted&quot;);   
  }
  </code></pre>
  <p>I think there is some mistake in auth.js file of routing but am not able to figure it out.</p>