A simple barebone HTTP server implementation in golang, that uses chi as a router with cors, compression, and logging middlewares enabled.
$ go run .
Running HTTP server on :8080
Check the health endpoint.
curl https://localhost:8080/health
OK
The Dockerfile is built from scratch and produces a small image (~8.1 MB).
Build with:
$ docker build -t hellohttp .
Run with:
$ docker run -p 8080:8080 hellohttp
The following environment variables are available (use a .env file for convenience).
Name | Default | Description |
---|---|---|
PORT | 8080 | Port number |