servicelocator

Central location to register and locate services within a Node.js application.

npm install servicelocator
3 downloads in the last week
21 downloads in the last month

servicelocator

Build Coverage Dependencies

A central location to register and locate services within a Node.js application. This module implements the service locator pattern, as detailed by Martin Fowler.

Install

$ npm install servicelocator

Usage

Register a Service

var locator = require('servicelocator');

locator.register('db', dbConnection);

Get a Service

var locator = require('servicelocator');

var dbConnection = locator.get('db');

Tests

$ npm install
$ npm test

Credits

License

The MIT License

Copyright (c) 2013 Jared Hanson [http://jaredhanson.net/](http://jaredhanson.net/)

npm loves you