Follow the instructions from https://go.dev/doc/install Make sure to download VERSION 1.23 for best compatibility.
- Air (auto-reload backend): go install github.com/air-verse/air@latest
- SQLc (generate type-safe code from SQL queries): go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
- Goose (SQL migration management tool): go install github.com/pressly/goose/v3/cmd/goose@latest
- Make
- Docker
Make commands only work on unix like systems.
- Create a new PostgreSQL instance using docker with
make init-dev-db
- Start PostgreSQL for development
make start-dev-db
- Check health of DB
make health-dev-db
- Check health of DB
- Run migrations when ready
make up
- Start development server
make dev
Use
make query "SELECT ... FROM ..."
for quick query on the terminal. You should also checkout the other available commands in the Makefile.