3.0.0 • Published 1 year ago

express-edge v3.0.0

Weekly downloads
101
License
MIT
Repository
github
Last release
1 year ago

express-edge

Use Edge templating engine with Express

Build Status npm version npm version npm downloads npm license prs Welcome eslint

Installation

npm install express-edge --save

Usage

See the Edge documentation for how to structure your templates.

Requires Node.js 14+ from express-edge@3

const express = require('express');
const app = express();
const engine = require('express-edge');

// Automatically sets view engine and adds dot notation to app.render
app.use(engine);
app.set('views', `${__dirname}/views`);

// Configure view caching
app.enable('view cache');
// --- or ---
app.diable('view cache');

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

app.listen(3000);

License

MIT © Daniel Eckermann