diff --git a/README.md b/README.md index 967731d6..9ead3e96 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Run your IRC client on a server and access it from the web browser. This allows you to chat from multiple devices at the same time and you will stay connected to IRC even when you close your browser. -### [Try the Shout client](http://shout-irc.com:9000/) +### [Try the Shout client](http://shout-irc.com:9090/) _Some highlights:_ diff --git a/config.json b/config.json index 8914005b..5279f1fe 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "port": 9000, + "port": 9090, "theme": "themes/example.css", "public": true } diff --git a/index.js b/index.js index 38af7c4f..2635e61b 100755 --- a/index.js +++ b/index.js @@ -2,15 +2,19 @@ process.chdir(__dirname); +var config = require("./config.json"); var program = require("commander"); var shout = require("./src/server.js"); -var version = require("./package.json").version; + +program + .option("-p, --port "); program .command("start") - .description("Starts the server.") + .description("Start the server") .action(function() { - shout(); + var port = program.port || config.port; + shout(port); }); program.parse(process.argv) diff --git a/src/server.js b/src/server.js index e8c11841..50da77c5 100644 --- a/src/server.js +++ b/src/server.js @@ -25,8 +25,8 @@ var inputs = [ "whois" ]; -module.exports = function() { - var port = config.port || 9000; +module.exports = function(port) { + var port = port || config.port || 9000; var app = http() .use(index) .use(http.static("client"))