An app template to write application in go. It can be rest api, gRPC or whatever.
- VSCode
- Go (1.22.0 or later)
- make
Create a .env file. See .env-example for reference.
Install goose for database migration.
go install github.com/pressly/goose/v3/cmd/goose@latestRun go run ./cmd/api to start the api server.
The server can be accessed in this url: http://localhost:3000
All the migration files are stored in internal/migrations directory.
Create a new migration file.
make mg-new name=user_tableApply all available migrations
make mg-upRevert single migration from current version
make mg-downTo check migration status.
make mg-statusNote: For local database we might need to remove tls=skip-verify from the connection string