From 921e4d9fdfa0a464ad90da679fac778fc9206ede Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Thu, 4 Nov 2010 10:31:56 -0700 Subject: [PATCH] Added port arg to test/server.js --- test/server.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/server.js b/test/server.js index 8c824a4..1f577ff 100644 --- a/test/server.js +++ b/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'); \ No newline at end of file +}).listen(port); +console.log('Test image server started on port ' + port); \ No newline at end of file