httpsrve
v1.0.3
Published
Node.js version of `python -m http.server` for local file access & download.
Maintainers
Readme
httpsrve

A lightweight HTTP server to browse and download files from your local directories.
Features
- 🚀 Zero configuration web server
- 📂 Directory listing with navigation
- 📄 File serving with appropriate content types
- 🔗 Easy access to local files through a browser
Installation
npm i httpsrve -gUsage
Basic usage (serves current directory on port 80):
httpsrvSpecify a different port:
httpsrv 8080Specify a custom directory to serve:
httpsrv 80 filesSpecify both port and directory:
httpsrv 3000 path/to/filesHow It Works
Once started, httpsrv will display a message like:
Serving HTTP on 0.0.0.0 port 80 (http://localhost:80/) ...Visit the displayed URL in your browser to browse files and directories.
Content Types
httpsrve automatically detects and serves files with appropriate content types including:
- HTML (.html, .htm)
- CSS (.css)
- JavaScript (.js)
- Images (.png, .jpg, .jpeg, .gif, .svg)
- Text (.txt)
- JSON (.json)
- Other files (served as binary downloads)
