title: how can i use res.render for ejs multiple times?
body: <p>I'm trying to call res.render twice in my nodeJS application but I keep getting an error, when I do so. does anyone know how I could call res.render twice in my app, without switching the file? or including it in all one res.render or changing the director?</p>
  
  <pre><code>var express = require("express");
  var app = express();
  app.set("view engine", "ejs");
  app.get("/", function (req, res) {
      res.render("index", {
          data: "Hello, guys",
      });
      res.render("index", {
          name: "Hello, again",
      });
  });
  
  app.listen(10022, function () {
      console.log("server is up");
  });
  </code></pre>
  
  <p>I know the above code will not work. I would like to know how i can send data, and name at different times during the code.</p>