diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-12-22 18:34:02 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-12-22 18:34:02 +0100 |
| commit | cbd5c09c5e1403709d4aabf91051443f147689e5 (patch) | |
| tree | 5add0c1a15df56ec121a77f3d4bd895c7d5f19df /main.go | |
| parent | 9bba6dcbb2e83fe53604d38b89fb79ce47eacddd (diff) | |
refactor(backend): move db related in new package
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -15,6 +15,7 @@ import ( "time" "git.anhgelus.world/anhgelus/small-web/backend" + "git.anhgelus.world/anhgelus/small-web/backend/storage" "github.com/joho/godotenv" ) @@ -61,9 +62,9 @@ func main() { ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) defer cancel() - db := backend.ConnectDatabase(cfg) + db := storage.ConnectDatabase(cfg.Database) defer db.Close() - err := backend.RunMigration(ctx, db) + err := storage.RunMigration(ctx, db) if err != nil { panic(err) } |
