fix: 确保数据目录和上传目录存在后再初始化数据库
This commit is contained in:
@@ -215,6 +215,8 @@ func startServer() {
|
||||
logger.Init()
|
||||
database.Init()
|
||||
|
||||
os.MkdirAll("uploads", 0755)
|
||||
|
||||
if config.GetString("app.env") == "production" {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user