A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies. This microservice is based on a GitHub gist by enricofoltran, featured on HackerNews which was later moved to enricofoltran/simple-go-server.
- Install Docker CE
# go to app directory
$ cd microservices/app
# build the docker image
$ docker build -t simple-go-server-app .
# run the image
$ docker run --rm -it -p 5000:5000 simple-go-server-app
# app will be available at http://localhost:5000
# press Ctrl+C to stop the server
- Install Golang
- Move the
simple-go-server
directory to yourGOPATH
and cd into the directory
# change to app directory
$ cd mircoservices/app
# run the local server script
# windows users: run this in git bash
$ go run src/main.go
# app will be available at http://localhost:5000
# press Ctrl+C to stop the server