0.0.0 • Published 12 years ago

handlebars-server v0.0.0

Weekly downloads
2
License
-
Repository
github
Last release
12 years ago

handlebars-server

The goal of this module is to make possible the use Handlebars in systems that cannot run javascript (Java, PHP, etc), using nodejs instead of rhino or other havier stuff :D

It exports a Connect/Express middleware and a method for using with sockets

Usage

Make a directory with your handlebar stuff:

Create a HTTP server with connect:

Now you are ready to make POST requests to ´´´http://localhost:3000/handlebars´´´. You can also use the module like this:

Enjoy!

Instalation

Tests

Run the tests:

  • npm install -d
  • node test/server.js
  • npm test

NOTES

  • To access to the partials just refer to them like {{> partial1}}
  • The partials directory can have subfolders. To access to those partials use ´´´{{> folder/partial2}}´´´
  • For examples look at the test directory
  • This module can also be used with file sockets:

TODO

  • make automated tests for sockets