The Echo API is a versatile and very simple web server that provides an echo feature (echoes whatever you send to it). Under the hood, it implements a layered architecture on top of Echo Framework, GORM and SQLite.
There are two ways to make this app run locally:
- Natively, using Golang 1.21.1 (Must be installed in your computer)
- Through Kubernetes, using
Docker Desktop
, its native Kubernetes cluster enabled andkubectl
. (This way only tested in MacOS)
You'll find the necessary Kubernetes declarative files to make this app run in your local cluster under resources/local-deployment/kubernetes/
-
Running this app natively:
- From the root folder of this repo, execute
go mod tidy
. - Execute
go run cmd/main.go
to run the web server, which exposes the application throughlocalhost:8080
- Execute
go test ./...
to run unit tests.
- From the root folder of this repo, execute
-
Running this app inside your local Kubernetes cluster:
- From the root folder of this repo, execute
./deploy.sh
- Run option 1 to build the Docker image
- Run option 2 to set the API configmap and launch the API pod (it exposes the app through
localhost:30001
) - Run option 3 whenever you've finished to terminate the pod and remove configmap.
- From the root folder of this repo, execute
/v0/docs/
-> Swagger./v0/echo/
-> Creates anecho
resource./v0/whats-echoed/
-> Returnsecho
instances created so far.