Skip to content

Express.js view engine wrapper for mustache.js/handlebars.js/hogan.js

Notifications You must be signed in to change notification settings

microft/bigode.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bigode.js - mustachejs/handlebarsjs/hogan.js wrapper for express.js

express.js is the most widespread web framework for nodejs.

mustache.js, handlebars.js and Hogan.js are template systems based on, or derived from, Mustache. But these modules don't work with express.js out of the box. There is some boilerplate code that's missing.

Bigode.js tries to add that "glue" that will let you use these templating modules with express without all the boilerplate stuff.

Using bigode.js examples

var express = require('express');
var app = express.createServer(); // create the express app

var wrapper = require('bigode.js').mustache();   // <<<--- getting the mustache.js wrapper from bigode.js
var wrapper = require('bigode.js').handlebars();   // <<<--- getting the handlebars.js wrapper from bigode.js
var wrapper = require('bigode.js').hogan();   // <<<--- getting the hogan.js wrapper from bigode.js

app.configure(function() {
    app.set('views', __dirname + '/views');
    app.use(express.bodyParser());
    app.use(express.methodOverride());
    app.use(app.router);
    app.use(express.static(__dirname + '/public'));
    app.register('.html', wrapper);   // <<<-- using wrapper to process .html files
});

About

Express.js view engine wrapper for mustache.js/handlebars.js/hogan.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published