Permalink
Browse files

switched over to upnode.listen

  • Loading branch information...
1 parent b162771 commit 2b66a4a6239c9eba281a3c9bf05265553ed7f7cb @substack committed Mar 27, 2012
Showing with 13 additions and 8 deletions.
  1. +11 −5 index.js
  2. +2 −3 package.json
View
@@ -1,4 +1,3 @@
-var dnode = require('dnode');
var upnode = require('upnode');
var pushover = require('pushover');
var mkdirp = require('mkdirp');
@@ -82,17 +81,24 @@ Propagit.prototype.listen = function (controlPort, gitPort) {
git : gitPort,
};
- var server = dnode(function (remote, conn) {
+ var server = upnode(function (remote, conn) {
this.auth = function (secret, cb) {
if (typeof cb !== 'function') return
else if (self.secret === secret) {
cb(null, self.createService(remote, conn));
}
else cb('ACCESS DENIED')
};
- });
- server.use(upnode.ping);
- server.listen(controlPort);
+ }).listen(controlPort);
+
+ if (!self._servers) self._servers = [];
+ self._servers.push(server);
+
+ self.close = function () {
+ self._servers.forEach(function (s) {
+ s.close();
+ });
+ };
var repos = self.repos = pushover(self.repodir);
repos.on('push', function (repo) {
View
@@ -1,7 +1,7 @@
{
"name" : "propagit",
"description" : "cascading multi-server git deployment",
- "version" : "0.5.3",
+ "version" : "0.5.4",
"repository" : {
"type" : "git",
"url" : "git://github.com/substack/propagit.git"
@@ -26,8 +26,7 @@
},
"dependencies" : {
"optimist" : "0.3.x",
- "dnode" : "0.9.x",
- "upnode" : "0.1.x",
+ "upnode" : "~0.2.0",
"pushover" : "0.1.x",
"mkdirp" : "0.3.x"
},

0 comments on commit 2b66a4a

Please sign in to comment.