create-servers
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -149,7 +149,7 @@ 'use strict'; | ||
// | ||
key: fs.readFileSync(path.join(ssl.root, ssl.key)), | ||
cert: fs.readFileSync(path.join(ssl.root, ssl.cert)), | ||
key: fs.readFileSync(path.resolve(ssl.root, ssl.key)), | ||
cert: fs.readFileSync(path.resolve(ssl.root, ssl.cert)), | ||
ca: ssl.ca && ssl.ca.map( | ||
function (file) { | ||
return fs.readFileSync(path.join(ssl.root, file)); | ||
return fs.readFileSync(path.resolve(ssl.root, file)); | ||
} | ||
@@ -156,0 +156,0 @@ ), |
{ | ||
"name": "create-servers", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Create an http AND/OR an https server and call the same request handler.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -47,3 +47,2 @@ /* | ||
}, function (err, servers) { | ||
console.dir(err); | ||
t.error(err); | ||
@@ -56,2 +55,21 @@ t.equals(typeof servers, 'object'); | ||
test('absolute cert path resolution', function (t) { | ||
t.plan(3); | ||
createServers({ | ||
log: console.log, | ||
https: { | ||
port: 3456, | ||
root: '/', | ||
cert: path.resolve(__dirname, 'fixtures', 'agent2-cert.pem'), | ||
key: path.resolve(__dirname, 'fixtures', 'agent2-key.pem') | ||
}, | ||
handler: fend | ||
}, function (err, servers) { | ||
t.error(err); | ||
t.equals(typeof servers, 'object'); | ||
t.equals(typeof servers.https, 'object'); | ||
servers.https.close(); | ||
}); | ||
}); | ||
test('http && https', function (t) { | ||
@@ -70,3 +88,2 @@ t.plan(4); | ||
}, function (err, servers) { | ||
console.dir(err); | ||
t.error(err); | ||
@@ -121,3 +138,2 @@ t.equals(typeof servers, 'object'); | ||
}, function (err, servers) { | ||
console.dir(err); | ||
t.error(err); | ||
@@ -138,3 +154,2 @@ t.equals(typeof servers, 'object'); | ||
}, function (err, servers) { | ||
console.dir(err); | ||
t.error(err); | ||
@@ -157,3 +172,2 @@ t.equals(typeof servers, 'object'); | ||
}, function (err, servers) { | ||
console.dir(err); | ||
t.error(err); | ||
@@ -160,0 +174,0 @@ t.equals(typeof servers, 'object'); |
Sorry, the diff of this file is not supported yet
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
15889
326
3