pico-static-server
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -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 @@ ``` |
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
71
82588