http-serve-file

0.3.10 • Public • Published

http-serve-file

npm GitHub

Conveniently serve single file or specific files in a directory, based on Koa.js.

Install

npm install http-serve-file

Features

  • Use SHA256 of the file path as route to prevent conflicts.
  • Print ip addresses available to simpify uri sharing.
  • Detailed logs

Usage

To serve static file(s) via http or https.

http-serve-file <file(s)> [options]

Options:

  • --version: Show version number [boolean]
  • --addr, -a: Address to bind [default: "::"]
  • --port, -p: Port to listen to [default: "8000"]
  • --tls: Enable https [boolean]
  • -h, --help: Show help [boolean]
  • -c, --cert: Path to tls cert file [default: "cert.pem"]
  • -k, --key: Path to tls key file [default: "key.pem"]
  • --local, -l: Display local addresses [boolean]
  • -h, --help: Show help [boolean]

License

MIT License

Package Sidebar

Install

npm i http-serve-file

Weekly Downloads

2

Version

0.3.10

License

MIT

Unpacked Size

31.5 kB

Total Files

5

Last publish

Collaborators

  • dcsunset