Ninjas Practicing Multidimensionality

    express-edge

    2.0.2 • Public • Published

    express-edge

    Use Edge templating engine with Express

    travis 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.

    const express = require('express');
    const app = express();
    const { config, engine } = require('express-edge');
     
    // Configure Edge if need to
    config({ cache: process.env.NODE_ENV === 'production' });
     
    // Automatically sets view engine and adds dot notation to app.render
    app.use(engine);
    app.set('views', `${__dirname}/views`);
     
    app.get('/', (req, res) => {
      res.render('users.index', { users: [...] });
    });
     
    app.listen(3000);

    License

    MIT © Daniel Eckermann

    Install

    npm i express-edge

    DownloadsWeekly Downloads

    151

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    11.5 kB

    Total Files

    17

    Last publish

    Collaborators

    • ecrmnn