View replacement for Express using Template.
Install
npm:
Install withnpm i express-template --save-dev
Run tests
npm test
Usage
// create normal express appvar express = ;var app = ; // create an instance of Template to usevar Template = ;var template = ; // require in express-templatevar View = template;// add some global configurationView; // configure the express app so it uses Viewapp;
API
View
Initialize a new View
with the given name
. This View
class matches the interface for the View
class in express so it can replace the default View
engine.
name
{String}options
{Object}
Options:
defaultEngine
the default template engine nameroot
root path for view lookup
.render
options
{Object}fn
{Function}
Render with the given options
and callback fn(err, str)
.
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
Brian Woodward
License
Copyright (c) 2015 Brian Woodward
Released under the MIT license
This file was generated by verb on January 14, 2015.