hardlounge/index.js

25 lines
426 B
JavaScript
Raw Normal View History

2014-08-05 08:32:25 +00:00
#!/usr/bin/env node
process.chdir(__dirname);
2014-08-05 08:44:21 +00:00
var config = require("./config.json");
2014-08-05 08:32:25 +00:00
var program = require("commander");
var shout = require("./src/server.js");
2014-08-05 08:44:21 +00:00
program
.option("-p, --port <port>");
2014-08-05 08:32:25 +00:00
program
.command("start")
2014-08-05 08:44:21 +00:00
.description("Start the server")
2014-08-05 08:32:25 +00:00
.action(function() {
2014-08-05 08:44:21 +00:00
var port = program.port || config.port;
shout(port);
2014-08-05 08:32:25 +00:00
});
program.parse(process.argv)
if (!program.args.length) {
program.help();
}