This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
tstatic/README.md
2017-01-21 23:15:59 +00:00

1.1 KiB

tstatic CircleCI

The only static-file server you'll ever need!

Features:

  • Logging
  • Basic-Auth (optional)
  • Custom 404 page
  • Optimum Compression - compression
  • Security checks / headers - helmet
  • Opbeat error-reporting - docs

Usage / Configuration

tstatic <directory>

directory is where your static files are.

404 errors will return with <directory>/.404.html, with status code 404. If this file doesnt exist, plain error page will be shown.

Environment

Make sure to set NODE_ENV to production!

PORT: The port you want the server to listen on. Default: 5000.

BASIC_AUTH_USERNAME / BASIC_AUTH_PASSWORD: Credentials for built-in basic auth

Opbeat middleware is configured using documented variables here. Requires production NODE_ENV!