Add io-host option

This commit is contained in:
calzoneman 2013-09-06 16:30:20 -05:00
parent 6aecb32c89
commit bca7199ec1
3 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Fri Sep 6 16:29 2013 CDT
* lib/config.js: Add an io-host option to allow binding socket.io to
a different IP than the webserver
Fri Sep 6 15:51 2013 CDT
* lib/utilities.js: Tweak the throttle code for rate limiters to fix
incorrect behavior of the burst cap after the cooldown period has

View file

@ -19,6 +19,7 @@ var defaults = {
"mysql-user" : "cytube",
"mysql-pw" : "supersecretpass",
"express-host" : "0.0.0.0",
"io-host" : "0.0.0.0",
"asset-cache-ttl" : 0,
"web-port" : 8080,
"io-port" : 1337,

View file

@ -171,7 +171,7 @@ var Server = {
self.httpserv = self.app.listen(Server.cfg["web-port"],
Server.cfg["express-host"]);
self.ioserv = express().listen(Server.cfg["io-port"],
Server.cfg["express-host"]);
Server.cfg["io-host"]);
// init socket.io
self.io = require("socket.io").listen(self.ioserv);