hyper.io-handlebars

0.0.1 • Public • Published

hyper.io-handlebars

Handlebars Template Middleware for Hyper.io

NPM

$ npm install hyper.io-handlebars

Use

var hyper      = require('hyper.io');
var handlebars = require('hyper.io-handlebars');
 
// add Handlebars, this is optional,
// hyper.io will auto try to require the 'handlebars'
// if it's not included in the middleware already
hyper().use(handlebars);
 
// load config and routes
hyper().start({
    routes: [
        {
            view: "/hello",
            template: "hello {{ hello }} - {{ ts }}",
            method: {
                get: function world($done)
                {
                    $done( {
                        hello: "world",
                        ts: new Date()
                    } );
                }
            }
        }
    ]
});
 

Package Sidebar

Install

npm i hyper.io-handlebars

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • jstty