limo

0.1.1 • Public • Published

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('**');

Readme

Keywords

none

Package Sidebar

Install

npm i limo

Weekly Downloads

5

Version

0.1.1

License

none

Last publish

Collaborators

  • chocolateboy
  • mantoni