This commit is contained in:
Sense T
2024-04-11 11:41:33 +08:00
parent 7a5fcf1972
commit 58c66fc3a8
10 changed files with 68 additions and 36 deletions

View File

@@ -19,6 +19,9 @@ func NewServer(c *cli.Context) (*Server, error) {
if err := database.Connect(c.String("mysql-dsn")); err != nil {
return nil, err
}
if c.Bool("debug") {
database.Client = database.Client.Debug()
}
return &Server{
webServer: gin.New(),