https://github.com/artyom/webhost
https://github.com/artyom/webhost
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/artyom/webhost
- Owner: artyom
- License: mit
- Created: 2016-11-29T20:39:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-30T10:16:35.000Z (over 9 years ago)
- Last Synced: 2025-01-14T07:53:56.279Z (over 1 year ago)
- Language: Go
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
webhost command runs simple http server mapping local directories to different
domain names and subpaths.
Usage of webhost:
-addr string
address to listen at (default "localhost:8080")
-map string
file with host/backend mapping (default "mapping.yml")
-rto duration
maximum duration before timing out read of the request (default 10s)
-wto duration
maximum duration before timing out write of the response (default 5m0s)
Format of mapping file:
hostname1/path/: /local/filesystem/path1
hostname2: /local/filesystem/path2
/path/: /local/filesystem/path3
Note how path has trailing slash — if it's omitted, directory would only be
available under exact `/path`, but not `/path/`. If mapping is configured with
`/path/`, then both `/path` and `/path/` would work, with former doing redirect
to latter.