servicelocator
v1.0.0
Published
Central location to register and locate services within a Node.js application.
Downloads
7
Readme
servicelocator
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');
Related Modules
- notifications — a mechanism for dispatching notifications
Tests
$ npm install
$ npm test
Credits
License
Copyright (c) 2013 Jared Hanson <http://jaredhanson.net/>