Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-servers

Package Overview
Dependencies
Maintainers
4
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-servers - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

6

index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc