Conveniently serve single file or specific files in a directory, based on Koa.js.
npm install http-serve-file
- Use SHA256 of the file path as route to prevent conflicts.
- Print ip addresses available to simpify uri sharing.
- Detailed logs
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]
MIT License