This project is a simple bank CRUD API, written using standard http and sql packages.
-
Fill the config files following the given examples.
-
Make sure to update your docker-compose.yml file to reflect your configurations.
-
reflex (globaly installed) to run the server in development mode:
go install github.com/githubnemo/CompileDaemon@latest- Golang-migrate (globaly installed) to run migrations.
Install all the dependencies:
make depsStart your postgres database:
docker compose up -dStart the web server in dev mode:
make dev- Create a migration:
make migrate-create name=<YOUR_MIGRATION_NAME>- Migrate up:
make migrate-up- Migrate down:
make migrate-down- Revert changes to a specific version:
make migrate-goto v=<TARGET_VERSION>- Fix a dirty version:
make migrate-fix v=<TARGET_VERSION>