12 lines
237 B
JavaScript
12 lines
237 B
JavaScript
var argv = require("commander")
|
|
.option("-p, --port <n>", "port to use", parseInt)
|
|
.parse(process.argv);
|
|
|
|
PORT = 80; // Default port.
|
|
if (argv.port) {
|
|
PORT = argv.port;
|
|
}
|
|
|
|
// Run the server.
|
|
(require("./lib/server.js")).listen(PORT);
|