aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.go b/main.go
index 4f2fd6b..b1a192e 100644
--- a/main.go
+++ b/main.go
@@ -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)
}