Better deployment with air. Colorized history. Fixed table bugs. Table will be added to game if coming from QR code. With tables in the history. App could be deployed now

This commit is contained in:
Jonas Hahn
2025-08-27 15:00:52 +02:00
parent 01132e1968
commit 9595da7a53
8 changed files with 62 additions and 38 deletions

View File

@@ -58,7 +58,6 @@ func main() {
if err != nil {
lg.Fatal("sqlite connect:", err)
}
lg.Println("using SQLite qrank.db")
if err := db.AutoMigrate(&User{}, &Session{}, &LoginToken{}, &Table{}, &Game{}, &GameUser{}); err != nil {
lg.Fatal("migrate:", err)
@@ -68,6 +67,7 @@ func main() {
}
// Create engine
gin.SetMode(gin.ReleaseMode)
r := gin.Default()
store := cookie.NewStore([]byte("secret"))
@@ -107,7 +107,7 @@ func main() {
// Start application with port
bind := ":" + port
lg.Println("listening on", bind, "base:", baseURL)
//lg.Println("Listening on", baseURL)
if err := r.Run(bind); err != nil {
lg.Fatal(err)
}