添加服务器 & 展示服务器

This commit is contained in:
奶爸
2019-12-08 23:18:29 +08:00
parent d8c4364653
commit 1b18e7103e
13 changed files with 149 additions and 38 deletions

View File

@@ -26,7 +26,16 @@ func init() {
if err != nil {
panic(err)
}
if dao.Conf.Debug {
dao.DB = dao.DB.Debug()
}
dao.Cache = cache.New(5*time.Minute, 10*time.Minute)
initDB()
}
func initDB() {
dao.DB.AutoMigrate(model.Server{})
}
func main() {