2014-03-06 22:36:56 +00:00
|
|
|
var commander = require("commander")
|
|
|
|
var listen = require("./lib/server.js").listen;
|
|
|
|
|
|
|
|
var argv = commander
|
2014-03-04 16:31:52 +00:00
|
|
|
.option("-p, --port <n>", "port to use", parseInt)
|
2014-03-06 15:11:25 +00:00
|
|
|
.parse(process.argv);
|
2014-03-04 16:31:52 +00:00
|
|
|
|
2014-03-06 22:36:56 +00:00
|
|
|
PORT = 80; // Default port
|
2014-03-04 16:31:52 +00:00
|
|
|
if (argv.port) {
|
|
|
|
PORT = argv.port;
|
|
|
|
}
|
|
|
|
|
2014-03-06 22:36:56 +00:00
|
|
|
listen(PORT);
|