archive
/
tstatic
Archived
1
Fork 0
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.
Go to file
Jake Howard 4e7e5b7f2f Setup typescript basics 2017-02-14 21:44:28 +00:00
site Update server structure 2016-08-13 16:31:22 +01:00
.eslintrc Updates 2017-01-19 17:39:29 +00:00
.gitignore Setup typescript basics 2017-02-14 21:44:28 +00:00
README.md Update readme 2017-01-21 23:15:59 +00:00
circle.yml Dont install twice 2017-01-19 17:41:26 +00:00
package.json Setup typescript basics 2017-02-14 21:44:28 +00:00

README.md

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!