No description
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.
Find a file
2017-01-21 23:15:59 +00:00
site Update server structure 2016-08-13 16:31:22 +01:00
src Add basic auth 2017-01-21 21:06:21 +00:00
tests Restructure 2017-01-19 17:31:23 +00:00
.eslintrc Updates 2017-01-19 17:39:29 +00:00
.gitignore Update server structure 2016-08-13 16:31:22 +01:00
circle.yml Dont install twice 2017-01-19 17:41:26 +00:00
package.json Add basic auth 2017-01-21 21:06:21 +00:00
README.md Update readme 2017-01-21 23:15:59 +00:00

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!