Update to work on node v0.12

This commit is contained in:
calzoneman 2015-02-14 12:17:06 -06:00
parent 9938f2c605
commit 406717bb18
2 changed files with 10 additions and 7 deletions

View File

@ -14,12 +14,12 @@ var defaults = {
}, },
listen: [ listen: [
{ {
ip: "", ip: "0.0.0.0",
port: 8080, port: 8080,
http: true, http: true,
}, },
{ {
ip: "", ip: "0.0.0.0",
port: 1337, port: 1337,
io: true io: true
} }
@ -169,12 +169,12 @@ function preprocessConfig(cfg) {
"and change your config.yaml to the new format."); "and change your config.yaml to the new format.");
cfg.listen = [ cfg.listen = [
{ {
ip: cfg.http.host, ip: cfg.http.host || "0.0.0.0",
port: cfg.http.port, port: cfg.http.port,
http: true http: true
}, },
{ {
ip: cfg.http.host, ip: cfg.http.host || "0.0.0.0",
port: cfg.io.port, port: cfg.io.port,
io: true io: true
} }
@ -183,7 +183,7 @@ function preprocessConfig(cfg) {
if (cfg.https.enabled) { if (cfg.https.enabled) {
cfg.listen.push( cfg.listen.push(
{ {
ip: cfg.http.host, ip: cfg.http.host || "0.0.0.0",
port: cfg.https.port, port: cfg.https.port,
https: true, https: true,
io: true io: true
@ -245,6 +245,9 @@ function preprocessConfig(cfg) {
cfg.io["ipv6-ssl"] = ""; cfg.io["ipv6-ssl"] = "";
for (var i = 0; i < cfg.listen.length; i++) { for (var i = 0; i < cfg.listen.length; i++) {
var srv = cfg.listen[i]; var srv = cfg.listen[i];
if (!srv.ip) {
srv.ip = "0.0.0.0";
}
if (!srv.io) { if (!srv.io) {
continue; continue;
} }

View File

@ -11,9 +11,9 @@
"body-parser": "^1.10.2", "body-parser": "^1.10.2",
"compression": "^1.3.0", "compression": "^1.3.0",
"cookie-parser": "^1.3.3", "cookie-parser": "^1.3.3",
"cytubefilters": "git://github.com/calzoneman/cytubefilters#89f56fee", "cytubefilters": "git://github.com/calzoneman/cytubefilters#33b7693c",
"express": "^4.11.1", "express": "^4.11.1",
"express-minify": "^0.1.2", "express-minify": "^0.1.3",
"graceful-fs": "^3.0.5", "graceful-fs": "^3.0.5",
"jade": "^1.9.1", "jade": "^1.9.1",
"json-typecheck": "^0.1.3", "json-typecheck": "^0.1.3",