From 16bee8ae76fd0eb3caf4be415ecab07c86147139 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 1 Apr 2015 17:47:26 +0000 Subject: [PATCH] lint, bugfix --- walnut.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/walnut.js b/walnut.js index e0da315..329cc93 100644 --- a/walnut.js +++ b/walnut.js @@ -20,6 +20,7 @@ fs.readFileSync = function (filename) { }; */ +var PromiseA = require('bluebird').Promise; //var config = require('./device.json'); var securePort = process.argv[2] || 443; var insecurePort = process.argv[3] || 80; @@ -61,11 +62,11 @@ function phoneHome() { holepunch.run(require('./redirects.json').reduce(function (all, redirect) { if (!all[redirect.from.hostname]) { all[redirect.from.hostname] = true; - all.push(redirect.from.hostname) + all.push(redirect.from.hostname); } if (!all[redirect.to.hostname]) { all[redirect.to.hostname] = true; - all.push(redirect.to.hostname) + all.push(redirect.to.hostname); } return all; @@ -74,11 +75,11 @@ function phoneHome() { }); } -PromiseA.all( +PromiseA.all([ require('./lib/insecure-server').create(securePort, insecurePort, redirects) , require('./lib/vhost-sni-server.js').create(securePort, certsPath, vhostsdir) -).then(function () { +]).then(function () { // TODO use `id' to find user's uid / gid and set to file process.setgid(1000); process.setuid(1000); -})//.then(phoneHome); +});//.then(phoneHome);