Need Assistance?

support@tutorialshub.in

Template Engines (EJS)

Passing Data & Rendering Views

ADVERTISEMENT
Express.js Free Lesson
5 min read
ADVERTISEMENT

Use res.render(viewName, dataObject) to compile an EJS template and send the resulting HTML to the browser. Inside the .ejs file, use <%= variable %> to safely output HTML-escaped values.

ADVERTISEMENT
Hi, I'm Tuby! Here to help you