-
-
Save mdobson/c77adab9717c8a67a8e7 to your computer and use it in GitHub Desktop.
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 characters
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 characters
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 characters
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment