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-27 10:19:11 +00:00
scripts Cleanup tests 2017-02-19 21:53:06 +00:00
site Update server structure 2016-08-13 16:31:22 +01:00
src Make it run as node 2017-02-20 08:45:14 +00:00
tests Remove test test 2017-02-27 10:19:11 +00:00
.gitignore Setup typescript basics 2017-02-14 21:44:28 +00:00
.npmignore Ignore more things 2017-02-20 08:50:01 +00:00
circle.yml Try setup circleci parallelism 2017-02-20 09:20:06 +00:00
package.json Split out 404 tests 2017-02-27 10:02:30 +00:00
README.md Prepare release 2017-02-20 08:58:08 +00:00
tsconfig.json Move tests 2017-02-19 21:59:54 +00:00
tslint.json add tslint 2017-02-17 22:28:53 +00:00
typings.json Start adding tests 2017-02-19 18:19:45 +00:00

tstatic

CircleCI npm npm

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

Features:

Usage

  tstatic <dir> [options]

  -h --help     Show this screen.
  --version     Show version.
  -p <port> --port=<port>  Port to listen on.
  -b <auth> --basic-auth=<auth>   Enable basic-auth.
  -i <ips> --ips=<ips>  Allowed IP addresses.
  -l --list-dir  List Directory.
  --opbeat  Enable Opbeat.
  -o --open  Open in browser after start.

dir is where your static files are.

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

Configuration

port

The port for the server to listen on. Currently supports plain HTTP only

basic-auth

Enable basic-auth for all paths. Currently only supports single credentals.

Format:-b username:password

ips

IP addresses that are allowed to connect to the server.

Format: -i 192.168.1.100,192.168.1.101

list-dir

Enables directory listing. Allow browseing

opbeat

Enable opbeat error reporting. --opbeat only enables this, configuration is done using environment varables.

open

Open the server in the browser one started. It will open in your default browser, and use url http://0.0.0.0:<port>.