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-02-17 09:24:29 +00:00
site Update server structure 2016-08-13 16:31:22 +01:00
src Add CLI 2017-02-17 09:24:29 +00:00
.gitignore Setup typescript basics 2017-02-14 21:44:28 +00:00
circle.yml Dont install twice 2017-01-19 17:41:26 +00:00
package.json Add CLI 2017-02-17 09:24:29 +00:00
README.md Update readme 2017-01-21 23:15:59 +00:00
tsconfig.json Add basic structure and start server code 2017-02-14 22:11:07 +00:00
typings.json Create rest of server 2017-02-15 20:46:18 +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!