title: Express rendering in/after post
body: <p>Web app routing novice here. I've got a relatively simple app working based on Node/Express.</p>
  
  <p>The main index of the app is a list of user names, and IDs.</p>
  
  <pre><code>localhost:242
  </code></pre>
  
  <p>Every user ID is a link to a page with a form to enter additional metadata about that particular user.</p>
  
  <pre><code>localhost:242/user/1398
  </code></pre>
  
  <p>Everything is working correctly. When I enter some metadata about the user, and submit the form, a POST route is executed, and then I'm redirected back to the original page I was on. Instead of using a redirect, I'd like to be able to re-render that same page, so I can pass some confirmation messages indicating what was just changed.</p>
  
  <p>Here's a simplified version of my code.</p>
  
  <pre><code>// Module imports
  var express = require('express');
  var validator = require('express-validator');
  var router = express.Router();
  
  router.get('/', function(req, res, next) {
      db.dataTalk(queryUsers, null, config.connection, function(err, result) {    
          var listUsers = result;
  
          res.render('index', {
              // Index with list of users
              title: 'Page Title',
              listUsers: listUsers
          });
      });
  });
  
  // GET /user/:id
  router.get('/user/:id', function(req, res, next) {
      db.dataTalk(queryUserDeets, [req.params.id], config.connection, function(err, result) {
          // Details for a single user
          var userDetails = result;
  
          res.render('user', {
              title: req.params.id,
              userDetails: userDetails
          });
      });
  });
  
  // POST /user-update
  router.post('/user-update', function(req, res) {
      // Here goes a lot of logic to validate the form contents, and update the appropriate databases
      // Redirect back to the user page, which should display the updated metadata
      res.redirect('/user/' + req.body.userInitID);
  
  });
  
  module.exports = router;
  </code></pre>