ejs view engine
app.set("view engine", "ejs");
app.set("views", __dirname + "/public");
app.use(express.static("public/assets/"));
ejs view engine
app.set("view engine", "ejs");
app.set("views", __dirname + "/public");
app.use(express.static("public/assets/"));
how to use ejs with client side ejs
<div id="output"></div>
<script src="ejs.min.js"></script>
<script>
let people = ['geddy', 'neil', 'alex'],
html = ejs.render('<%= people.join(", "); %>', {people: people});
// With jQuery:
$('#output').html(html);
// Vanilla JS:
document.getElementById('output').innerHTML = html;
</script>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us