0.2.2 • Published 10 years ago

ctrlr v0.2.2

Weekly downloads
3
License
-
Repository
github
Last release
10 years ago

ctrlr

Simple controller dispatcher for node.

Auto loads all modules from a particular directory, using directory, and allows you to try to invoke the method.

There are some upcoming features, such as before actions etc.

(You can probably also use it on the client side with something like browserify)

Usage:

npm install ctrlr

Example usage:

var controllers = ctrlr(__dirname + '/controllers/');

controllers.cars.invokeAction('drive', ['Filmore and Geary', 'Grant Ave and O\'farrel']);
controllers.cars.invokeAction('shiftGears', [3]);
controllers.cars.invokeAction('noSuchAction', null, function(err) {
    console.log(err.stack);
});

License: MIT

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago