title: Rendering templates in node.js app in order
body: <p>I want to create a node.js app, where I want to render multiple different pug templates in a specific order. E.g. after the user clicks a button on &quot;template1&quot;, &quot;template2&quot; should be rendered. If the user presses a button on &quot;template2&quot;, &quot;template3&quot; should be rendered...</p>
  <p>At this point I have a simple app.post call (see below) to render &quot;template2&quot; after the button was clicked on &quot;template1&quot;.</p>
  <p>How would I go about rendering &quot;template3&quot; after &quot;template2&quot;? Do I have to include some kind of if block to check which template the user is currently on?</p>
  <pre><code>app.post('/', async function(req, res, next) {   
     res.render('template2')
  });
  </code></pre>