create-servers
Advanced tools
Comparing version 1.2.1 to 1.3.0
28
index.js
@@ -80,8 +80,14 @@ /* | ||
var server = http.createServer(options.http.handler || handler), | ||
port = options.http.port || 80; | ||
port = options.http.port || 80, | ||
args, | ||
ip; | ||
args = [server, port]; | ||
if (ip === options.http.ip) { | ||
args.push(ip); | ||
} | ||
log('http | try listen ' + port); | ||
connected(server, port, function (err) { | ||
onListen('http', err, this); | ||
}); | ||
args.push(function listener(err) { onListen('http', err, this); }); | ||
connected.apply(null, args); | ||
} | ||
@@ -101,3 +107,5 @@ | ||
ssl = options.https, | ||
server; | ||
server, | ||
args, | ||
ip; | ||
@@ -119,5 +127,9 @@ if (ssl.ca && !Array.isArray(ssl.ca)) { | ||
connected(server, port, function (err) { | ||
onListen('https', err, this); | ||
}); | ||
args = [server, port]; | ||
if (ip === options.https.ip) { | ||
args.push(ip); | ||
} | ||
args.push(function listener(err) { onListen('https', err, this); }); | ||
connected.apply(null, args); | ||
} | ||
@@ -124,0 +136,0 @@ |
{ | ||
"name": "create-servers", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "Create an http AND/OR an https server and call the same request handler.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
12194
215
3