I\'m using Node.js and trying to render an EJS template file. I figured out how to render strings:
var http = requ
Simply set express view engine to "ejs"
const express = require("express");
const app = express();
// template engine config
app.set("view engine", "ejs");
app.set("views", "views"); // setting the folder that has our views & it is default value even if not declared
app.get("/", (req, res, next) => {
res.render("index");
});
and of course you need to set your directory as so:
And that is it.