Hello-mr-badger

Simple http server application written in Go.

Build

Clone this repository

git clone https://github.com/chesnovskii/hello-mr-badger.git

Using Makefile

amd64 platform

make build

arm64 platform

make build-arm

Manually

docker build -t $IMAGE_NAME:$IMAGE_TAG --platform $IMAGE_PLATFORM .

Run

Using Makefile

amd64 platform

make run

arm64 platform

make run-arm

Manually

docker run -ti --name $APP_NAME -p 8080:8080 $IMAGE_NAME:$IMAGE_TAG

Usage examples

curl -i http://localhost:8080/
HTTP/1.1 200 OK

Mr. Badger greetings you!
curl -i http://localhost:8080/mr-badger/ping
HTTP/1.1 200 OK

{"time":"2022-10-17 7:7:47.157459722","service":{"name":"mr-badger","version":"1.0.0","type":"backend"},"status":{"code":0}}
curl -s -i http://localhost:8080/mr-badger/alive
HTTP/1.1 200 OK