https://github.com/mwyvr/httphere
Simple Go/Chi powered http server meant for ad hoc use such as exposing a file system for testing HTML.
https://github.com/mwyvr/httphere
chi go golang
Last synced: 5 months ago
JSON representation
Simple Go/Chi powered http server meant for ad hoc use such as exposing a file system for testing HTML.
- Host: GitHub
- URL: https://github.com/mwyvr/httphere
- Owner: mwyvr
- License: mit
- Created: 2021-12-04T16:14:14.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-14T19:31:59.000Z (about 2 years ago)
- Last Synced: 2024-06-21T14:11:57.616Z (almost 2 years ago)
- Topics: chi, go, golang
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# httphere
`httphere` is a simple Go/Chi powered http file server intended for ad hoc use
such as testing HTML or temporarily exposing a local file system at the current
working directory (hence http**here**) and below.
Given the expected use, cache-control headers are disabled by default.
## Installation
go install github.com/mwyvr/httphere@latest
## Usage
`httphere` starts a webserver in the current working directory at the default
or specified port; if that port cannot be bound to, it will attempt to bind to
one of the next 100 ports in sequence.
By default, via the special address `0.0.0.0`, the server binds to all available
IPv4 addresses on the machine including its real IP address(es) and localhost/loopback
at 127.0.0.1.
Available flags:
-address string
Address server should listen on (default "0.0.0.0")
-nocache
Sets no-cache and other headers.
-nocache=false to disable (default true)
-port int
Port server should bind to (default 8080)