Simple Todo list Go server. Uses Go and PostgreSQL
See openapi.yaml.
Install golangci-lint:
brew install golangci-lintYou will need psql binary. On MacOS install it via homebrew:
brew install libpq# install build and development dependencies
make prepare
# build app
makeThe following command will create and run detached Docker containers running a PostgreSQL database with an Adminer instance
# start containers
docker compose up -d
# setup database
make reset-db
# start server
make run-server
# shutdown
docker compose downWhen the local PostgreSQL database is empty or brand new, run the following script to create the schema:
docker-compose up -d
make reset-dbtern -m database/iban/migrations new <name>make migrate-up# migrate one version up
tern migrate -c database/migrations/tern.conf -m database/migrations -d +1
# migrate one version down
tern migrate -c database/migrations/tern.conf -m database/migrations -d -1
# migrate one version up again
tern migrate -c database/migrations/tern.conf -m database/migrations -d +1If no error occurred, then the migration is fine.
No setup required.
make unitRequires a full local setup.
docker-compose up -d
make integration