title: Node JS handling multiple post requests for same route
body: <p>I am building a Node JS app with Express JS and MongoDb. In my index.hjs (using hogan) page there is a login and forgot password functionality. Now both the forms have action as action="/" and method="POST"</p>
  
  <p>I am handling my login post request in my index.js like this</p>
  
  <pre><code> var express = require('express');
   var router = express.Router();
   var login = require('login.js');
  
  
  
  router.post('/', function(req, res, next) {
      var email = req.body.email;
      var password = req.body.password;
  
      //calls a login.js function and passes it the params
      login.login(email, password, req, res);
  });
  </code></pre>
  
  <p>Now my problem is that the forgot password submit is suppose to do a POST too but I am not sure how it should be handled. Do I do it in the same post? I figured that maybe using next() is the key but how? </p>
  
  <p>How can we handle multiple posts requests in general?</p>
  
  <p>PS: Fairly new to Node JS so pardon my logic and code.</p>
  
  <p>Thanks.</p>