express-edge
Use Edge templating engine with Express
Installation
npm install express-edge --save
Usage
See the Edge documentation for how to structure your templates.
const express = require('express');
const app = express();
const expressEdge = require('express-edge');
// Configure Edge if need to
expressEdge.config({cache: process.env.NODE_ENV === 'production'});
// Automatically sets view engine and adds dot notation to app.render
app.use(expressEdge.expressEdge);
app.set('views', `${__dirname}/views`);
app.get('/', (req, res) => {
res.render('users.index', { users: [...] });
});
app.listen(3000);
License
MIT ยฉ Daniel Eckermann