Project

httpme

0.0
The project is in a healthy, maintained state
Command line utility for running a web server for static files with basic authentication support
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.8.1, < 2
>= 5.6, < 7.0
>= 3.0, < 5
 Project Readme

httpme - static web server with basic authentication

Gem Version Build Status 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:

$ docker run --rm -it -p 3000:3000 -v $PWD:/docroot dannyben/httpme

Or, with basic authentication

$ export HTTPME_AUTH=user:password
$ docker run --rm -it -p 3000:3000 -v $PWD:/docroot \
    -e HTTPME_AUTH dannyben/httpme

Or, with docker-compose:

services:
  web:
    image: dannyben/httpme
    volumes: [".:/docroot"]
    ports: ["3000:3000"]
    environment:
      HTTPME_AUTH:

See image on DockerHub 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.