Hydrator is a small Node.js-based web application framework for semi-static sites. It maps URL paths to files, compiling certain kinds of assets on-the-fly, as appropriate. Hydrator also allows for dynamic content, with CoffeeScript files that can be executed to generate a response.

Routes are mapped to different possible files. Static assets, like HTML, PNGs, CSS, and JS, are served directly. Certain file types, like Markdown and CoffeeScript, are compiled before serving. CoffeeScript files at the root of the project are used as server-side scripts, and executed in a sandbox with helpers for handling the request and response.

Dynamic content is as simple as:

response.ok('<h1>Hello, world!</h1>')

Usage NPM version

Hydrator is a CLI app, installable using npm.

$ npm install -g hydrator

Create a project:

$ hydrator create hello_world

Serve the project:

$ hydrator serve hello_world
Server listening on http://localhost:5000

The site content is in the www/ folder. The project is ready to be deployed to Heroku. Simply create an app on Heroku, commit, and push.

Source Build Status

Public Domain, on GitHub »

And now, some Instagram photos, demonstrating the dynamic aspect:

by Alec Perkins