1.0.4 • Published 9 years ago

express-jade-cache-helper v1.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

express-jade-cache-helper

npm version Build Status codecov.io

express helper that caches all .jade files to memory on startup

Install

$ npm install --save express-jade-cache-helper

Usage

Below is a example of usage.

var express = require('express');
var jadeCacheHelper = require('express-jade-cache-helper');

var app = express();
var indexApp = express();

indexApp.set('view engine', 'jade');
indexApp.set('views', __dirname + '/templates');
indexApp.get('/home', function(req, res, next){
  res.render('show');
});

app.use(jadeCacheHelper(adminApp)); // <= important part
app.listen(3000);

API

jadeCacheHelper(expressApp, options):

  • expressApp: express app, important: it needs to fire 'mount' event
  • options:
    • jadeExt: Template file name extension (default '.jade')

Options

Use DEBUG=ejch:cache to debug with debug.

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago