express ejs
snippet in javascript

add one file to another in ejs

user5931

<%- include('partials/messages'); %>

express ejs

user9062

let express = require('express');
let app = express();

app.set('view engine', 'ejs');

app.get('/', (req, res) => {
  res.render('index', {foo: 'FOO'});
});

app.listen(4000, () => console.log('Example app listening on port 4000!'));

how to include in ejs

user8108

 <%- include('./partials/nav.ejs') %>

ejs

user6811

npm install ejs	//install ejs in cmd