limo

Dependency injection with licy.js modules

npm install limo
2 downloads in the last week
8 downloads in the last month

limo.js

Dependency injection with licy.js modules.

Build Status

Install on Node

npm install limo

What's it doing?

Limo requires plugins and registers them on licy.js, a dependency and lifecycle management tool. You can then use licy to start, stop and destroy the plugins.

Usage

The limo module exposes a single function. Pass either a config:

var limo = require('limo');

limo({
  // plugins go here (see below)
})

or a path to a JSON file with the config:

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 required 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", "./lib/router/template"],
  "server"  : "./lib/server"
}

The limo function returns the licy.js module for convenience:

limo('index.json').start('**');
npm loves you