Added --port option
This commit is contained in:
parent
4b21c319c2
commit
cd1383c1f0
@ -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.
|
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:_
|
_Some highlights:_
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"port": 9000,
|
"port": 9090,
|
||||||
"theme": "themes/example.css",
|
"theme": "themes/example.css",
|
||||||
"public": true
|
"public": true
|
||||||
}
|
}
|
||||||
|
10
index.js
10
index.js
@ -2,15 +2,19 @@
|
|||||||
|
|
||||||
process.chdir(__dirname);
|
process.chdir(__dirname);
|
||||||
|
|
||||||
|
var config = require("./config.json");
|
||||||
var program = require("commander");
|
var program = require("commander");
|
||||||
var shout = require("./src/server.js");
|
var shout = require("./src/server.js");
|
||||||
var version = require("./package.json").version;
|
|
||||||
|
program
|
||||||
|
.option("-p, --port <port>");
|
||||||
|
|
||||||
program
|
program
|
||||||
.command("start")
|
.command("start")
|
||||||
.description("Starts the server.")
|
.description("Start the server")
|
||||||
.action(function() {
|
.action(function() {
|
||||||
shout();
|
var port = program.port || config.port;
|
||||||
|
shout(port);
|
||||||
});
|
});
|
||||||
|
|
||||||
program.parse(process.argv)
|
program.parse(process.argv)
|
||||||
|
@ -25,8 +25,8 @@ var inputs = [
|
|||||||
"whois"
|
"whois"
|
||||||
];
|
];
|
||||||
|
|
||||||
module.exports = function() {
|
module.exports = function(port) {
|
||||||
var port = config.port || 9000;
|
var port = port || config.port || 9000;
|
||||||
var app = http()
|
var app = http()
|
||||||
.use(index)
|
.use(index)
|
||||||
.use(http.static("client"))
|
.use(http.static("client"))
|
||||||
|
Loading…
Reference in New Issue
Block a user