https://github.com/acoshift/serve-http
Very small http service for serve static contents
https://github.com/acoshift/serve-http
Last synced: 8 months ago
JSON representation
Very small http service for serve static contents
- Host: GitHub
- URL: https://github.com/acoshift/serve-http
- Owner: acoshift
- Created: 2016-07-04T13:24:55.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-07T07:17:04.000Z (over 9 years ago)
- Last Synced: 2025-02-01T02:20:02.858Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# serve-http
Very small http service for serve static contents.
## Usage
```bash
$ serve-http --help
NAME:
serve-http - a very small http service for serve static contents
USAGE:
serve-http [--fallback] [--index=index.html] [--dir=www] [--port=80] [--script] [--key=APIKEY]
VERSION:
1.0.0
AUTHOR(S):
Thanatat Tamtan
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--fallback enable to serve index file if current file not found
--index value (default: "index.html")
--dir value (default: "www")
--port value (default: 80)
--script enable to run .sh as script
--key value authenticate key ?key=
--help, -h show help
--version, -v print the version
```
- Build
```Dockerfile
FROM docker.io/acoshift/serve-http
COPY public /www
```
```sh
docker build -t my-project .
```
- Run
```sh
docker run -p 8080:80 -d my-project
```
or add config
```sh
docker run -p 8080:80 -d my-project --fallback --index=index.html --dir=www
```