----- TestEjs4 Example -------------------------- // TestEjs4 Example // Source code file: main.js // Display a name obtained from a GET query // on the ejs page. For example, use this URL: // localhost:3000/employee?fname=Alice const express = require("express"); const app = express( ); app.set("view engine", "ejs"); app.get("/employee", (q, r) => { var nameFromQuery = q.query.fname; r.render("employee", {name: nameFromQuery}); }); app.listen(3000, ( ) => { console.log("Listening on port 3000."); }); ------------------------------------------------- TestEjs4 Example

TestEjs4 Example

Hello, <%= name %>, how are you?

-------------------------------------------------