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

pico-static-server

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pico-static-server - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

4

examples/pico-https-server.js

@@ -8,6 +8,6 @@ const createServer = require('pico-static-server');

protocol: 'https', // defaults to 'http'
cert: __dirname + '/localhost.crt', // defaults to 'localhost.crt'
key: __dirname + '/localhost.key', // defaults to 'localhost.key'
cert: __dirname + '/localhost.crt',
key: __dirname + '/localhost.key',
});
// Try opening https://localhost:8080/
{
"name": "pico-static-server",
"version": "3.0.0",
"version": "3.0.1",
"description": "Small yet fully functional Node.js static files server with zero dependencies with HTTPS support",

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

# Pico-static-server
Tiny yet fully functional functional Node.js static files server with zero dependencies with HTTPS support.
Tiny yet fully functional Node.js static files server with zero dependencies and **HTTPS** support.

@@ -17,12 +17,18 @@ ### Install

```
assuming you put your content into ``./examples/static/`` folder.
assuming you've put your content into ``./examples/static/`` folder.
HTTPS example requires you to generate SSL cerificates first:
**HTTPS** example requires you to generate SSL cerificates first:
```bash
cd ./examples
; Generate 2048-bit RSA private key and remove the password from generated key
```
Generate 2048-bit RSA private key and remove the password from generated key
```bash
openssl genrsa -des3 -passout pass:x -out localhost.pem 2048 && openssl rsa -passin pass:x -in localhost.pem -out localhost.key && rm localhost.pem
; Generate a Certificate Signing Request (CSR)
```
Generate a Certificate Signing Request (CSR)
```bash
openssl req -new -key localhost.key -out localhost.csr
; Generate a self-signed certificate that is valid for 365 days with sha256 hash and remove CSR
```
Generate a self-signed certificate that is valid for 365 days with sha256 hash and remove CSR
```bash
openssl x509 -req -sha256 -days 365 -in localhost.csr -signkey localhost.key -out localhost.crt && rm localhost.csr

@@ -29,0 +35,0 @@ ```

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