Todo App built in Go with Skaffold deployment.
- sqlc - generate database interface and models from migrations and queries
- openapi-generator - generate models and clients from OpenAPI spec
- dockertest - spin up postgres in docker for integration tests
git submodule update --init --recursive
Install Docker with brew:
brew cask install docker
Setup local cluster running in Docker using kind. Postgres will be installed in this step to avoid recreating database on each run.
make bootstrap
Skaffold will build Docker images and deploy the stack to the cluster. Application will run in the background.
make run
Run the backend in debugging mode.
make debug
Connect to running backend using todo-service launch configuration in VSCode.
Continously develop stack:
make dev
If files change the affected artifacts will be built and re-deployed automatically.
Following ports are exposed when running:
:8080
API:9000
API Documentation:5432
Postgres
Open http://localhost in the browser. API endpoints can be tested directly from Swagger UI.
open http://localhost
Destroy the cluster:
make clean-kind
All data in Postgres will be lost.
Full cleanup including downloaded tools:
make clean