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

create-servers

Package Overview
Dependencies
Maintainers
3
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 1.3.0 to 1.3.1

7

index.js

@@ -73,4 +73,5 @@ /*

options.http = {
port: typeof options.http === 'number'
? options.http
// accept both a string and a number
port: !isNaN(options.http)
? +options.http
: false

@@ -105,3 +106,3 @@ };

var port = options.https.port || 443,
var port = +options.https.port || 443,
ssl = options.https,

@@ -108,0 +109,0 @@ server,

{
"name": "create-servers",
"version": "1.3.0",
"version": "1.3.1",
"description": "Create an http AND/OR an https server and call the same request handler.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -83,3 +83,3 @@ create-servers

**http && http (different handlers)s**
**http && https (different handlers)**
``` js

@@ -86,0 +86,0 @@ var servers = createServers(

@@ -106,2 +106,17 @@ /*

});
test('only http with string type input for http port', function (t) {
t.plan(3);
createServers({
log: console.log,
http: "9876",
handler: fend
}, function (err, servers) {
console.dir(err);
t.error(err);
t.equals(typeof servers, 'object');
t.equals(typeof servers.http, 'object');
servers.http.close();
});
});
});
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