2.0.1 • Published 3 years ago

teeny-static-server v2.0.1

Weekly downloads
17
License
MIT
Repository
github
Last release
3 years ago

Teeny Static Server

npm David David GitHub Workflow Status

Teeny Static Server is a simple, zero-configuration, command line HTTP server to serve static files locally.

Installation

This command line utility can be installed globally or locally within your project. It does make more sense to have it installed globally though, since it then can be use anywhere by simply starting it to serve the files located in the current folder.

> npm install -g teeny-static-server

Usage

> teeny-static-server [options] [path]

[path] defaults to the current folder if it's not provided at the command line prompt.

At that point, you should be able to visit http://localhost:8080 and see the files located in the current folder.

Options

optiondefaultdescription
-c or --cache <number>0Time in seconds for caching files
-C or --corsfalseSet CORS headers to * to allow requests from any origin
-h or --helpDisplay help instructions
-l or --logsfalseLog HTTP requests at the prompt
-o or --openfalseOpen in your default browser
-p or --port <n>8080Port to listen on - Will try next available if already used
-g or --gziptrueEnable GZIP compression
-v or --versionOutput the current version

Credits

This package was heavily inspired from serve, with the intent to make a version that is simpler to use, with zero-configuration needed, but only supporting a subset of "serve" features, limited to local serving, and no support for SSL encryption.

License

MIT © Arno Versini

2.0.1

3 years ago

2.0.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.5

3 years ago

0.0.3

3 years ago

0.0.4

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago