Table of contents
Open Table of contents
Go PostgreSQL SQL Builder Example
PostgreSQL, SQL query builder and migrations usage example in Go.
Repository: https://github.com/martishin/golang-postgresql-sql-builder-example
Running Locally
- Run Postgres locally using Docker Compose:
make run-postgres
- Install golang-migrate:
brew install golang-migrate
- Apply migrations:
make migrate
- Generate SQL Builder and Data Model types:
make jet-gen
- Run the application:
go run main. go
- Alternatively, run the app and PostgreSQL using Docker Compose:
make build && make run