Skip to content
Template Render helper for connect: res.render(view, options).
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
example
test
.gitignore
.travis.yml
Makefile
README.md
package.json
render.js

README.md

connect-render

Build Status

Template Render helper for connect.

Install

$ npm install connect-render

Usage

var connect = require('connect');
var render = require('connect-render');

var app = connect(
  render({
    root: __dirname + '/views',
    layout: 'layout.html',
    cache: true, // `false` for debug
    helpers: {
      sitename: 'connect-render demo site',
      starttime: new Date().getTime()
    }
  })
);

app.use(function(req, res) {
  res.render('index.html', { url: req.url });
});

app.listen(8080);
Something went wrong with that request. Please try again.