schoolyard-recess

0.0.1 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i schoolyard-recess

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • particlebanana