1.1.1 • Published 11 years ago

beardo v1.1.1

Weekly downloads
9
License
-
Repository
github
Last release
11 years ago

beardo

Provides an easy way to use layout aware mustache templates in your node.js projects. Add mustache files to a templates directory and use beardo's methods to simply asynchronously read and render them as appropriate for your setup.

If you are using one of the http handlers (beardo.middleware, beardo.handler) ETags get automatically added and 304 responses occur based on the if-none-match request header.

beardo.handler(res, req, options)

Adds a Templar style response handler.

var beardo = require('beardo')
  , beardopts = { directory: path.join(__dirname, './templates')
    , stamp: 'stamp-' + process.pid
    }

http.createServer(function(req, res) {
  res.template = beardo.handler(req, res, beardopts)

  // Meanwhile
  res.template('heyo', { headers: headers, layout: 'html' })
})

Options

  • directory: The directory that holds the mustache files
  • stamp: Gets added to the response header as x-beardo-stamp to aid in debugging
1.1.1

11 years ago

1.1.0

11 years ago

1.0.0

11 years ago

0.0.10

11 years ago

0.0.9

11 years ago

0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

12 years ago

0.0.1

12 years ago