Created
January 30, 2015 14:57
-
-
Save AdamMagaluk/6d5f1acfedbbce6d3455 to your computer and use it in GitHub Desktop.
Revisions
-
AdamMagaluk created this gist
Jan 30, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ var util = require('util'); var zetta = require('zetta'); var DeviceRegistry = module.exports = function(path) { zetta.DeviceRegistry.call(this, { path: path, collection: 'devices' }); }; util.inherits(DeviceRegistry, zetta.DeviceRegistry); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ var util = require('util'); var zetta = require('zetta'); var PeerRegistry = module.exports = function(path) { zetta.PeerRegistry.call(this, { path: path, collection: 'peers' }); }; util.inherits(PeerRegistry, zetta.PeerRegistry); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ var zetta = require('zetta'); var DeviceRegistry = require('./device_registry'); var PeerRegistry = require('./peer_registry'); zetta({ peerRegistry: new PeerRegistry('./mypeers'), registry: new DeviceRegistry('./mydevices') }) .listen(0);