Browse Source

Added port arg to test/server.js

v1.x
Tj Holowaychuk 14 years ago
parent
commit
921e4d9fdf
  1. 9
      test/server.js

9
test/server.js

@ -6,6 +6,11 @@
var http = require('http')
, fs = require('fs');
var args = process.argv.slice(2)
, port = args.length
? parseInt(args[0], 10)
: 3000;
var images = fs.readdirSync(__dirname + '/images').slice(1);
function ul(items) {
@ -40,5 +45,5 @@ http.createServer(function(req, res){
}
});
}
}).listen(3000);
console.log('Test image server started on port 3000');
}).listen(port);
console.log('Test image server started on port ' + port);
Loading…
Cancel
Save