node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org ยป



A simple registry to associated versioned service names with host/ip info


npm install service-registry


See test/ for all usage examples

Registering a service

var Registry = require('service-registry');
var r = new Registry();

r.register('hello-service@1.0.2', '', 80, { additionalExampleField: 'world'});

Getting a service

var info = r.get('hello-service@1.x');

info then contains:

  "name": "hello-service",
  "fullName": "hello-service@1.0.2",
  "version": "1.0.2",
  "host": "",
  "port": 80,
  "meta": {
    "additionalExampleField": "world"

Note: You must use the same Registry instance

Listing all services

var services =;

services then contains an array of info instances as above

Unregistering a service



npm test


When developing install all packages after cloning (npm i) and then run npm run-script dev.

The dev script runs nodemon test.js (if nodemon is not installed, just install it with npm i -g nodemon) and also connects to growl to notify the developer about any errors during development (this is done via cura-test-runner)