Skip to content

DCsunset/http-serve-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Serve static files via http or https

Resources

License

Stars

Watchers

Forks

Packages

No packages published