Socket
Socket
Sign inDemoInstall

serve

Package Overview
Dependencies
Maintainers
82
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serve - npm Package Compare versions

Comparing version 12.0.0 to 12.0.1

16

bin/serve.js

@@ -97,7 +97,9 @@ #!/usr/bin/env node

-S, --symlinks Resolve symlinks instead of showing 404 errors
--ssl-cert Optional path to an SSL/TLS certificate to serve with HTTPS
--ssl-key Optional path to the SSL/TLS certificate\'s private key
--ssl-cert Optional path to an SSL/TLS certificate to serve with HTTPS
--ssl-pass Optional path to the SSL/TLS certificate\'s passphrase
--ssl-key Optional path to the SSL/TLS certificate\'s private key
--no-port-switching Do not open a port other than the one specified when it\'s taken.

@@ -204,6 +206,9 @@

const sslPass = args['--ssl-pass'];
const server = httpMode === 'https'
? https.createServer({
key: fs.readFileSync(args['--ssl-key']),
cert: fs.readFileSync(args['--ssl-cert'])
cert: fs.readFileSync(args['--ssl-cert']),
passphrase: sslPass ? fs.readFileSync(sslPass) : ''
}, serverHandler)

@@ -236,3 +241,3 @@ : http.createServer(serverHandler);

localAddress = `${httpMode}://${address}:${details.port}`;
networkAddress = networkAddress ? `${httpMode}://${ip}:${details.port}` : null;
networkAddress = ip ? `${httpMode}://${ip}:${details.port}` : null;
}

@@ -385,2 +390,3 @@

'--ssl-key': String,
'--ssl-pass': String,
'-h': '--help',

@@ -387,0 +393,0 @@ '-v': '--version',

{
"name": "serve",
"version": "12.0.0",
"version": "12.0.1",
"description": "Static file serving and directory listing",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc