BuildServer
Overview
build server with Hook.IO integration - alpha (in development)
- runs entirely in Node.js - platform independent
- wraps a Hook.IO server and adds some convenient auto-wiring functionality
- built in filesystem watcher (using Watch, which works on OS X, Linux, and Windows)
- includes a [Jade](https://github.com/visionmedia/jade) compiler service
Why
* recompiling templates on every request for every page is unnecessary and costs $
* static site generators are difficult to realistically implement for most web apps
* needed to have templates compiled based on event bindings other than a web requests
* needed a skeleton to build on and eventually get entire build process integrated
* provides a good framework for asynchronous testing
Installation
npm install buildserver
Usage
require('buildserver').createServer([options]);
Options
All of the options are pretty straightforward. If you have used hook.io before, the main differences are that everything can be set at initialization (rather than having to set properties like host and port in the start method), and some property names are standardized (e.g. 'host' and 'port' rather than 'hook-host' and 'hook-port'). Properties common to the BuildServer and hook.io classes (e.g. name, debug, host, port) should be set in the main options object. All other hook.io configuration should be set in 'config'. You don't need to call the start method unless you set autostart to false. See the examples for more info on how to set various options to take advantage of the framework.
- name: 'buildServer',
- port: 5000,
- host: '127.0.0.1',
- debug: false,
- autostart: true,
- silenceAll: false,
- noServices: false
- config
- local: true,
- autoheal: true
Events & Triggers
BuildServer extends the standard event framework in hook.io with some custom events
- add::watchPath - trigger to bind filesystem watcher with another service
- compile::jade - trigger to request a file to be compiled by Jade
- addWatch::jade - trigger to add a watchpath observer for the Jade compiler service
- filewatcher::jade - filewatcher watching new directory for jade (acknowledgment)
Requirements
- node.js
License
MIT-License, see LICENSE.txt