Skip to content

Instantly share code, notes, and snippets.

@Kami
Created March 20, 2013 23:22
Show Gist options
  • Select an option

  • Save Kami/5209442 to your computer and use it in GitHub Desktop.

Select an option

Save Kami/5209442 to your computer and use it in GitHub Desktop.
Service Registry - register a service (new way)
var Client = require('service-registry-client').Client;
var client = new Client('myuser', 'myapikey', null);
var heartbeatTimeout = 15, serviceMetadata = {'tags': ['api']};
client.services.create('serviceId', 15, serviceMetadata, function(err, id) {
// Service has been created, start heartbeating.
hb.start();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment