feat: config, migrations embed, and server entrypoint
- internal/config: typed Config struct loaded from env vars via godotenv; all fields from docs (listen addr, JWT, DB, storage, thumbs, import) - migrations/embed.go: embed FS so goose SQL files are baked into the binary - cmd/server/main.go: load config → connect pgxpool → goose migrations (embedded) → Gin server with GET /health returning 200 OK - .env.example: documents all required and optional env vars - go.mod: bump to Go 1.26, add gin/pgx/goose/godotenv as direct deps Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package migrations
|
||||
|
||||
import "embed"
|
||||
|
||||
// FS holds all goose migration SQL files, embedded at build time.
|
||||
//
|
||||
//go:embed *.sql
|
||||
var FS embed.FS
|
||||
Reference in New Issue
Block a user