Giter VIP home page Giter VIP logo

bigode.js's Introduction

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
});

bigode.js's People

Stargazers

Rhio Kim avatar Luís Miguel Braga avatar

Watchers

Luís Miguel Braga avatar Filipe Regadas avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.