Actually, I did this project to make something in Go and Docker.
I'm very new to GoLang. There are many mistakes and no tests.
docker run -d -p 5000:5000 tatoglu/whoami:latest
There are 3 endpoints.
It can be used to learn hostname of the container.
curl http://localhost:5000/
{"hostname": "89f02ed1a4dd"}
It can be used to learn current date and time of the container.
curl http://localhost:5000/date
{"hostname": "89f02ed1a4dd", "date": "2022-09-17T14:02:52.397349799Z"}
It can use to have fun. The endpoint get a joke from I can haz dad joke website. Everytime a new joke will get.
curl http://localhost:5000/joke
{"hostname": "89f02ed1a4dd", "joke":"People saying 'boo! to their friends has risen by 85% in the last year.... That's a frightening statistic."}
- Develop an API.
- Call a 3rd party website from the API.
- Move all the response models into a folder or module.
- Move all the handlers into a folder or module.
- Add GitHub Actions for deployment to Docker Hub.