Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

74 lines (47 sloc) 2.11 kb

Recess

A framework for building Card-Catalog based apps on. Inspired by Express and Union.

Build Status

var recess = require('recess'),
    manager = require('catalog_manager');

var app = recess();

app.set('connection', conn);
app.card(manager);

app.on('ready', function() {
  app.listen(3000);
});

app.create();

Install

$ npm install schoolyard-recess

Usage

Recess is simply a helper for building an application on top of Card-Catalog. It provides a clean interface to setting up categories and cards as well as some helpers attached to the request and response object.

Available helper methods on a recess object are:

set: options for instantiating a Category

app.set('setting', 'value');

before: middleware function to run before dispatching to a Category instance.

app.before(function(req, res, next) {});

card: a Card to use in your Card-Catalog app.

app.card(Manager);

create: initialize a catalog by loading all the available cards and setting up a template cache. Emits a ready event when the catalog has been built.

listen: create an http server and listen on a given port.

app.listen(process.env.PORT);

For more information view the documentation on the Card-Catalog project

Tests

All tests are written in mocha and should be run with npm.

$ npm test

Thanks

Recess is heavily based off and inspired by the work done by TJ Holowaychuk and all the other contributers to Express and Connect. It borrows code from both the Express and Connect projects and tries to give attribution where code is used.

Jump to Line
Something went wrong with that request. Please try again.