No description
site | ||
src | ||
.eslintrc | ||
.gitignore | ||
circle.yml | ||
package.json | ||
README.md | ||
tsconfig.json | ||
typings.json |
tstatic
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
!