title: Is it possible to have redirection follow a rendering in express + node js?
body: <p>I have use case where there needs to be rendering followed by redirection. Rendering is supposed to inform user about successful transaction using inherit view model followed by redirection to home page. Following is desired code:</p>
  
  <pre><code>router.post('/posturi', function(req, res, next) {
     //Call few services
     if(err){ 
       return res.render('/errorpage')
     }
     res.render('/transaction page');
     //TimeOut function goes here
     res.redirect('/home');
  });
  </code></pre>
  
  <p>One way is to insert a middleware in next, but that doesn't look the best way to go about it. Please let me know if there is a way to make it happen</p>