https://github.com/dannyben/httpme
Static files web server with basic authentication
https://github.com/dannyben/httpme
static-site web-server
Last synced: 4 months ago
JSON representation
Static files web server with basic authentication
- Host: GitHub
- URL: https://github.com/dannyben/httpme
- Owner: DannyBen
- License: mit
- Created: 2020-03-30T16:27:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-29T04:51:21.000Z (over 1 year ago)
- Last Synced: 2025-04-16T08:17:51.071Z (about 1 year ago)
- Topics: static-site, web-server
- Language: Ruby
- Homepage:
- Size: 53.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# httpme - static web server with basic authentication

httpme is a command line utility for serving static HTMLs and other files
with optional basic authentication support.
## Installation
$ gem install httpme
## Docker
Start the web server and mount the current directory:
```shell
$ docker run --rm -it -p 3000:3000 -v $PWD:/docroot dannyben/httpme
```
Or, with basic authentication
```shell
$ export HTTPME_AUTH=user:password
$ docker run --rm -it -p 3000:3000 -v $PWD:/docroot \
-e HTTPME_AUTH dannyben/httpme
```
Or, with docker-compose:
```yaml
services:
web:
image: dannyben/httpme
volumes: [".:/docroot"]
ports: ["3000:3000"]
environment:
HTTPME_AUTH:
```
See image on [DockerHub](https://hub.docker.com/r/dannyben/httpme) for
additional details.
## Usage
```
$ httpme --help
httpme - static web server with basic authentication
Options can be set using command line arguments or environment variables
Usage:
httpme [PATH] [--port PORT --host HOST --auth AUTH]
httpme (-h|--help)
Options:
-p, --port PORT
Server port (default: 3000)
-o, --host HOST
Server host (default: 0.0.0.0)
-a, --auth AUTH
Specify user:password to enable basic authentication
-h --help
Show this help
Parameters:
PATH
Path to the directory you want to serve [default: .]
Environment Variables:
HTTPME_PATH
Same as --path
HTTPME_AUTH
Same as --auth
HTTPME_PORT
Same as --port
HTTPME_HOST
Same as --host
Examples:
httpme -p 3000
httpme docs --auth admin:s3cr3t
HTTPME_AUTH=admin:s3cr3t httpme docs # same result as above
```
## Contributing / Support
If you experience any issue, have a question or a suggestion, or if you wish
to contribute, feel free to [open an issue][issues].
---
[issues]: https://github.com/DannyBen/httpme/issues