diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/trains-webui/main.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cmd/trains-webui/main.go b/cmd/trains-webui/main.go index 0ea3b57..c33cbbf 100644 --- a/cmd/trains-webui/main.go +++ b/cmd/trains-webui/main.go @@ -7,6 +7,7 @@ import ( "git.adyxax.org/adyxax/trains/internal/webui" "git.adyxax.org/adyxax/trains/pkg/config" + "git.adyxax.org/adyxax/trains/pkg/database" ) func main() { @@ -23,5 +24,14 @@ func main() { if err != nil { log.Fatal(err) } - webui.Run(c) + + db, err := database.InitDB("sqlite3", "file:test.db?_foreign_keys=on") + if err != nil { + log.Fatal(err) + } + if err := db.Migrate(); err != nil { + log.Fatal(err) + } + + webui.Run(c, db) } |