I like to build a node site from a JSON file. The JSON file is read by Node js. In the JSON are templates names. I like to combine json multi templates to on file. I tried this code but this it isn't working
app.set('views', __dirname + '/views')
app.set('view engine', 'ejs');
app.use('/public', express.static(__dirname + '/public'));
app.get('/', function (req, res) {
res.render('home', { teller: 1000 });
res.render('slider', { start: 1000 });
})
Is there a way to combine ejs templates to one file?
Thank you