Simple API created using gin golang framework based on BMG Description.
You have to copy the provided .env.example
to .env
and configure the provided configuration if necessary
cp .env.example .env
Important: database host must be the same with database container name defined in
docker-compose.yaml
To run this app locally, you can clone this particular repository and make sure you have golang and postgresql environment setup.
A docker environment is also written in docker-compose.yaml
so you can recreate the environment easily.
run the command below
docker compose up
This will create two containers, one of them is the app itself while the others is postgresql instance. Those containers were already connected through docker network
an API specification is also defined in apispec.yaml
. The sample http client request can also be found in /http-clent-export
. Those sample export file can be imported in both postman or insomnia. Here are the example when it is imported on insomnia.
Swagger API Specification: app.swaggerhub.com