Skip to content

Commit

Permalink
Merge remote-tracking branch 'mtaylor91/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
espadrine committed Jun 11, 2015
2 parents c5137b5 + dd54c25 commit 012f3ff
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ass-stubs/server-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// We don't require ass because we can't test a majority of the server reliably.
//require('ass');
require('../server.js');
console.log('done');
console.log('ready');
process.on('SIGTERM', function() { process.exit(0); });
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"es6-promise": "~2.1.0",
"request": "~2.55.0",
"redis": "~0.12.1",
"camp": "~14.10.12",
"camp": "~15.5.5",
"semver": "~4.3.3",
"bower": "~1.4.1",
"promise": "~7.0.0"
Expand Down
6 changes: 4 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
var serverPort = +process.env.PORT || +process.argv[2] || 80;
var bindAddress = process.env.BIND_ADDRESS || process.argv[3] || '127.0.0.1';
var infoSite = process.env.INFOSITE || "http://shields.io";
var camp = require('camp').start({
documentRoot: __dirname,
port: serverPort
port: serverPort,
hostname: bindAddress
});
console.log('http://127.0.0.1:' + serverPort + '/try.html');
console.log('http://' + bindAddress + ':' + serverPort + '/try.html');
var https = require('https');
var domain = require('domain');
var request = require('request');
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('the server', function() {
server = cproc.spawn('node', ['ass-stubs/server-test.js', port]);
var isDone = false;
server.stdout.on('data', function(data) {
if (!isDone) { done(); isDone = true; }
if (data.toString().indexOf('ready') >= 0 && !isDone) { done(); isDone = true; }
});
server.stderr.on('data', function(data) { console.log(''+data); });
});
Expand Down

0 comments on commit 012f3ff

Please sign in to comment.