Permalink
Browse files

shimmed out custom pushover web server

  • Loading branch information...
1 parent 72ca529 commit 363c5a916d60bcf7b16fd9e9dedd33310f18192e @substack committed Jul 28, 2012
Showing with 10 additions and 1 deletion.
  1. +3 −1 index.js
  2. +7 −0 lib/web.js
View
@@ -3,6 +3,8 @@ var pushover = require('pushover');
var mkdirp = require('mkdirp');
var spawn = require('child_process').spawn;
+var createWebServer = require('./lib/web');
+
var fs = require('fs');
var path = require('path');
var Stream = require('stream').Stream;
@@ -107,7 +109,7 @@ Propagit.prototype.listen = function (controlPort, gitPort) {
drone.fetch(repo, logger(drone.id));
});
});
- repos.listen(gitPort);
+ createWebServer(repos, self.secret).listen(gitPort);
return self;
};
View
@@ -0,0 +1,7 @@
+var http = require('http');
+
+module.exports = function (repos, secret) {
+ return http.createServer(function (req, res) {
+ return repos.handle(req, res);
+ });
+};

0 comments on commit 363c5a9

Please sign in to comment.