2.3.0 • Published 6 months ago

servez v2.3.0

Weekly downloads
6,676
License
MIT
Repository
github
Last release
6 months ago

npm GitHub Build Status

npm.io Illustration by Nomi, [@the_nomi, mail]

servez: a simple command-line http server

servez is a simple, zero-configuration command-line http server for development and learning. Note there is also an app version for those who prefer GUIs.

Installing globally:

!!!Note!!!: you need to install node.js. I recommend installing node via nvm(mac/linux) or nvm-windows(windows)

Installation via npm:

 npm install servez -g

This will install servez globally so you can run it from the command line.

Running on-demand:

Using npx you can run servez without installing it first:

 npx servez [options] [path]

Usage:

 servez [options] [path] 

[path] defaults to the current folder.

You can now visit http://localhost:8080

Available Options:

  • -h or --help for help

  • -p or --port Port to use (defaults to 8080) note if port is in use will use next available port

  • --version prints the version number

  • --scan scan forward until an open port is found. (defaults to true. --no-scan to disable)

  • --dirs Show folder listings (defaults to true, --no-dirs to disable)

  • --qr Show a QR code for the root url of the server. This might help for using servez with a phone.

  • --cors Include CORS headers (defaults to true, --no-cors to disable)

  • --local make serve only accessible from this machine. The default is to serve publicly. (0.0.0.0 vs 127.0.0.1)

  • --index Display index.html for folders if it exists (defaults to true, --no-index to disable)

  • --gzip serve somefile.gz in place of somefile

  • --brotli serve somefile.br in place of somefile

  • --unity-hack ignore .gz and .br when computing content type. (defaults to true, --no-unity-hack to disable)

  • --shared-array-buffers include headers 'Cross-Origin-Opener-Policy': 'same-origin' and 'Cross-Origin-Embedder-Policy': 'require-corp'.

  • --header=<name>:<value> extra headers to include eg --header=Content-Language:de-DE'

  • --robots Provide a /robots.txt if one does not exist. (defaults to true. --no-robots to disable)

  • --hidden Show files that start with .

  • --username Username for basic authentication

  • --password Password for basic authentication

  • -S or --ssl Use https (will use a fake cert if not specified)

  • -C or --cert Path to ssl cert file

  • -K or --key Path to ssl key file

Pronunciation

Cortez, Hernández, Gomez, Ramírez, and Servez walked into a bar...

2.2.5

6 months ago

2.3.0

6 months ago

2.2.4

9 months ago

2.2.1

12 months ago

2.2.0

12 months ago

2.2.3

12 months ago

2.2.2

12 months ago

2.1.6

1 year ago

2.1.5

1 year ago

2.1.4

1 year ago

2.1.3

1 year ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.14.2

2 years ago

1.14.1

3 years ago

1.14.0

3 years ago

1.13.5

3 years ago

1.13.2

3 years ago

1.13.1

3 years ago

1.13.4

3 years ago

1.13.3

3 years ago

1.12.1

3 years ago

1.12.0

4 years ago

1.11.1

4 years ago

1.11.0

5 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.1

5 years ago

1.8.0

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago