EJS

Get Started:
Install:-
npm install ejs
Use:-
Pass EJS a template string and some data. BOOM, you’ve got some HTML.
let ejs = require('ejs');
Browser support:-
<script src="ejs.js"></script>
<script>
let people = ['geddy', 'neil', 'alex'];
let html = ejs.render('<%= people.join(", "); %>', {people: people});
</script>
Options:-
cacheCompiled functions are cached, requires filenamefilenameUsed by cache to key caches, and for includesrootSet project root for includes with an absolute path (e.g, /file.ejs). Can be array to try to resolve include from multiple directories.viewsAn array of paths to use when resolving includes with relative paths.contextFunction execution contextcompileDebugWhen false no debug instrumentation is compiledclientReturns standalone compiled functiondelimiterCharacter to use for inner delimiter, by default ‘%’openDelimiterCharacter to use for opening delimiter, by default ‘<’closeDelimiterCharacter to use for closing delimiter, by default ‘>’debugOutputs generated function bodystrictWhen set totrue, generated function is in strict mode_withWhether or not to use with() {} constructs. If false then the locals will be stored in the locals object. (Implies--strict)localsNameName to use for the object storing local variables when not using with Defaults to localsrmWhitespaceRemove all safe-to-remove whitespace, including leading and trailing whitespace. It also enables a safer version of -%> line slurping for all scriptlet tags (it does not strip new lines of tags in the middle of a line).escapeThe escaping function used with <%= construct. It is used in rendering and is .toString()ed in the generation of client functions. (By default escapes XML).outputFunctionNameSet to a string (e.g., ‘echo’ or ‘print’) for a function to print output inside scriptlet tags.asyncWhen true, EJS will use an async function for rendering. (Depends on async/await support in the JS runtime. Tags<%‘Scriptlet’ tag, for control-flow, no output<%_‘Whitespace Slurping’ Scriptlet tag, strips all whitespace before it<%=Outputs the value into the template (HTML escaped)<%-Outputs the unescaped value into the template<%#Comment tag, no execution, no output<%%Outputs a literal ‘<%’%>Plain ending tag-%>Trim-mode (‘newline slurp’) tag, trims following newline_%>‘Whitespace Slurping’ ending tag, removes all whitespace after it
Includes:-
Includes are relative to the template with the include call. (This requires the ‘filename’ option.) For example if you have “./views/users.ejs” and “./views/user/show.ejs” you would use <%- include(‘user/show’); %>.