3.0.5 • Published 2 days ago

@node-cli/static-server v3.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 days ago

Static Server

npm

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 @node-cli/static-server

Usage

> 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
-d or --dirstrueList the directory's contents
-h or --helpDisplay help instructions
--host127.0.0.1Change the default host address to bind to
-H or --http2falseEnable HTTP/2 and SSL (https)
-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

License

MIT © Arno Versini

3.0.5

2 days ago

3.0.4

18 days ago

3.0.3

2 months ago

3.0.2

3 months ago

3.0.1

4 months ago

3.0.0

4 months ago

2.1.1

10 months ago

2.1.0

11 months ago

2.0.2

11 months ago

2.0.1

12 months ago

2.0.0

12 months ago

1.1.2

12 months ago

1.1.1

12 months ago

1.1.0

12 months ago

0.0.8

12 months ago

0.0.7

12 months ago

0.0.6

12 months ago