Setup for a HTTP service
- Simple HTTP API, basic handler tests
- Httprouter
- Makefile
- multi-stage builds: see Dockerfile
- Structured logging: using logrus
- Versioning: service has version, commit and build time
- Health checks
Build and run a docker image:
make run
Make a request to the service:
curl -i localhost:8000/
HTTP/1.1 200 OK
Date: Sun, 15 Nov 2020 22:10:10 GMT
Content-Length: 83
Content-Type: text/plain; charset=utf-8
Request path:/
/health/live
/health/ready