Update to work on node v0.12
This commit is contained in:
parent
9938f2c605
commit
406717bb18
2 changed files with 10 additions and 7 deletions
|
|
@ -14,12 +14,12 @@ var defaults = {
|
|||
},
|
||||
listen: [
|
||||
{
|
||||
ip: "",
|
||||
ip: "0.0.0.0",
|
||||
port: 8080,
|
||||
http: true,
|
||||
},
|
||||
{
|
||||
ip: "",
|
||||
ip: "0.0.0.0",
|
||||
port: 1337,
|
||||
io: true
|
||||
}
|
||||
|
|
@ -169,12 +169,12 @@ function preprocessConfig(cfg) {
|
|||
"and change your config.yaml to the new format.");
|
||||
cfg.listen = [
|
||||
{
|
||||
ip: cfg.http.host,
|
||||
ip: cfg.http.host || "0.0.0.0",
|
||||
port: cfg.http.port,
|
||||
http: true
|
||||
},
|
||||
{
|
||||
ip: cfg.http.host,
|
||||
ip: cfg.http.host || "0.0.0.0",
|
||||
port: cfg.io.port,
|
||||
io: true
|
||||
}
|
||||
|
|
@ -183,7 +183,7 @@ function preprocessConfig(cfg) {
|
|||
if (cfg.https.enabled) {
|
||||
cfg.listen.push(
|
||||
{
|
||||
ip: cfg.http.host,
|
||||
ip: cfg.http.host || "0.0.0.0",
|
||||
port: cfg.https.port,
|
||||
https: true,
|
||||
io: true
|
||||
|
|
@ -245,6 +245,9 @@ function preprocessConfig(cfg) {
|
|||
cfg.io["ipv6-ssl"] = "";
|
||||
for (var i = 0; i < cfg.listen.length; i++) {
|
||||
var srv = cfg.listen[i];
|
||||
if (!srv.ip) {
|
||||
srv.ip = "0.0.0.0";
|
||||
}
|
||||
if (!srv.io) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue