This project showcases a service built using the Echo framework and utilizes ZeroLog for logging.
Project use port :8080 and use endpoint:
curl http://localhost:8080/statusThis endpoint output count of days until the start of the year 2025.
Also, we can use endpoint with header like this:
curl -H "User-Role: Admin" http://localhost:8080/statusAnd then we can see in server console output:
⇨ http server started on [::]:8080
5:47AM WRN red button user detectedThis warning indicates that a user with the "admin" role accessed the endpoint.
Clone this repo:
git clone https://github.com/RIDOS/echo-helloInstall dependencies:
go mod downloadBuild app:
go build echo-helloRun:
./echo-helloBuild your image:
docker build -t echo-hello .Start container:
docker run -p 8080:8080 echo-helloI would like spatecon for their instructional video and guidance, which greatly contributed to the development of this application.