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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user