Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Connect middleware for Handlebars

tag: 0.0.2

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 package.json
README.md

Introduction

connect-handlebars is Connect middleware that pre-compiles handlebars to JS. Since express is built on top of Connect, connect-handlebars will allow you to compile handlebars templates with expressjs.

Installation

npm install connect-handlebars

Usage

Example using express:

connect_handlebars = require('connect-handlebars')
app = require('express').createServer()

app.use("/templates.js", connect_handlebars("path/to/handles/templates", {
}));

app.listen(80);

The middleware builder takes two arguments source and options

  • source: The path to the root directory of .handlebars files to compile.
  • options: Object of options with the following keys
Something went wrong with that request. Please try again.