title: Change URL after POST using ExpressJS
body: <p>I use expressJS as my NodeJS server. The user sends me his login info through a POST and after checking the credentials I render a page:</p>
  
  <pre><code>router.post("/login", function (req: Request, res: Response, next) {
     if(credentialsOK){
        res.render('main');
     }
  });
  </code></pre>
  
  <p>The problem is that the URL becomes <a href="http://myaddress/login" rel="noreferrer">http://myaddress/login</a> and I would like to remove the /login of the address. I don't want to use redirect as I want to send local variables through the render.</p>
  
  <p>How can I change the URL?</p>