Socket
Socket
Sign inDemoInstall

http-serve-file

Package Overview
Dependencies
6
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    http-serve-file

Serve static files via http(s)


Version published
Maintainers
1
Created

Readme

Source

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

Keywords

FAQs

Last updated on 02 Oct 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc