Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dannyben/httpme
Static files web server with basic authentication
https://github.com/dannyben/httpme
static-site web-server
Last synced: 3 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 (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-09T06:11:06.000Z (11 months ago)
- Last Synced: 2024-10-06T05:19:35.362Z (3 months ago)
- Topics: static-site, web-server
- Language: Ruby
- Homepage:
- Size: 49.8 KB
- Stars: 2
- Watchers: 3
- 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
[![Gem Version](https://badge.fury.io/rb/httpme.svg)](https://badge.fury.io/rb/httpme)
[![Build Status](https://github.com/DannyBen/httpme/workflows/Test/badge.svg)](https://github.com/DannyBen/httpme/actions?query=workflow%3ATest)
[![Maintainability](https://api.codeclimate.com/v1/badges/6626f32d6a99288dcc98/maintainability)](https://codeclimate.com/github/DannyBen/httpme/maintainability)---
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 --helphttpme - 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 helpParameters:
PATH
Path to the directory you want to serve [default: .]Environment Variables:
HTTPME_PATH
Same as --pathHTTPME_AUTH
Same as --authHTTPME_PORT
Same as --portHTTPME_HOST
Same as --hostExamples:
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