Skip to content

GORM Installation

Install the addon with:

Terminal window
keel add gorm

Manual install:

Terminal window
go get github.com/slice-soft/ss-keel-gorm
  • Adds github.com/slice-soft/ss-keel-gorm to dependencies.
  • Creates cmd/setup_gorm.go.
  • Injects db := setupGorm(app, appLogger) into cmd/main.go.
  • Adds database property keys and .env examples.

Generated config keys:

database.engine=${DATABASE_ENGINE:sqlite}
database.url=${DATABASE_URL:./app.db}

Generated env examples:

Terminal window
DATABASE_ENGINE=sqlite
DATABASE_URL=./app.db

The generated bootstrap also registers the built-in health checker so /health reflects database connectivity.