Created
January 30, 2015 14:57
-
-
Save AdamMagaluk/6d5f1acfedbbce6d3455 to your computer and use it in GitHub Desktop.
Zetta With Custom DB Locations
This file contains 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 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 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