minioc-broadway [](http://travis-ci.org/spicydonuts/minioc-broadway
Broadway plugin for adding minioc and minioc-loader support to broadway/flatiron apps. minioc-broadway
extends the app.use
function and sets app.minioc
to the minioc
library import.
Usage
var broadway = // or 'flatiron' app = minioc_broadway = ; app;app; // using `minioc-broadway` lets us use directories as plugins,app; // which are loaded via `minioc-loader`console;app; // flatiron: `app.start(3000, console.log);`
Options
rootdir
- required - root directory of the app (__dirname
from the main app file)noRegister
- iftrue
,minioc-broadway
will not automatically create registrations inminioc
app.use(minioc_broadway, { rootdir: __dirname, noRegister: true });
Registrations
Unless noRegister
is set, minioc-broadway
will automatically register the following in minioc
as singletons (immutable registrations):
- $app - the broadway-based app (
this
from theattach
method) - $rootdir - the root directory as specified in the options (
rootdir
)