1.3.0 • Published 2 years ago

@marius321967/spaserve v1.3.0

Weekly downloads
22
License
ISC
Repository
-
Last release
2 years ago

Single Page App (SPA) file server based on Express.js Static middleware.

If the file is not found then requests will serve index.html with 200 status code. If user requests a special route (default: /404) then index.html will be served with a 404 status code.

Supports HTTP2 when running in HTTPS mode (using spdy).

The tool runs a single port and does not provide HTTP to HTTPS redirects. For this, find a separate tool (Docker: morbz/docker-web-redirect).

Arguments

  • --port
  • --dir the directory to serve static files from. Default: dist
  • --notfoundroute path (without leading /) which will return 404 statuses. SPAs can close & redirect to this route for a proper 404 response. Default route: 404
  • --https enables HTTPS instead of HTTP. Default: false. For self-signed certificates, see Node.JS tutorial
  • --sslkey filename of SSL private key. Default: ssl/key.pem
  • --sslcert filename of SSL certificate. Default: ssl/cert.pem
  • --sslpassphrase passphrase for SSL private key
  • --maxage seconds in Cache-Control header. Default: 600

Arguments can also be passed via uppercase environment variables.

1.2.0

2 years ago

1.3.0

2 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago