h-js
Hogan.js NPM package for express 3.x Forked from https://github.com/nullfirm/hjs due to no support on the original repository. We promise to support this package with all our goodness.
Installation
$ npm install -g express@3.0 h-js
Quick Start
Install Express :
$ npm install -g express@3.0
Create express app :
$ express -H /tmp/testapp
$ cd /tmp/testapp/
& npm install
Manual Start
Install Express :
$ npm install -g express@3.0
Create express app :
$ express /tmp/testapp
$ cd /tmp/testapp/
Edit package.json :
$ vi package.json
"dependencies":
$ npm install
Edit app.js :
app;
Make views/index.hjs :
{{ title }} {{ title }}
Start server :
$ node app
Partials
index.hjs
{{ title }} {{ title }} {{> footer }}
footer.hjs
My awesome footer
To use a partial once:
res;
To include a partial on every page:
app;
More Information
express is Fast, unopinionated, minimalist web framework for node.
Hogan.js is a compiler for the Mustache templating language. For information on Mustache, see the manpage and the spec.