limo
v0.1.1
Published
Dependency injection with licy.js modules
Downloads
3
Readme
limo.js
Dependency injection with https://github.com/mantoni/licy.js modules.
Install on Node
npm install limo
Usage
The limo
module exposes a single function. Pass either a config:
var limo = require('limo');
limo```
or a path to a json file with the config:
```js
var limo = require('limo');
limo('index.json');
The path must be relative to the cwd.
A config contains key value pairs where the key is going to be used as the licy.js plugin name and the value is require
d and used as the plugin.
{
"router.static" : "./lib/router/static",
"router.template" : "./lib/router/template",
"server" : "./lib/server"
}
It's also valid to specify an array of plugins for a single name:
{
"routers" : ["./lib/router/static", "router.template" : "./lib/router/template"],
"server" : "./lib/server"
}
The limo
function returns the licy
module for convenience:
limo('index.json').start('**');