mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-10-29 07:37:57 +08:00
Feat: Decide whether to do database migration based on version.lock
This commit is contained in:
13
main.go
13
main.go
@ -1,18 +1,23 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"Cloudreve/models"
|
||||
"Cloudreve/pkg/conf"
|
||||
"Cloudreve/routers"
|
||||
"cloudreve/models"
|
||||
"cloudreve/pkg/conf"
|
||||
"cloudreve/routers"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func init() {
|
||||
conf.Init("conf/conf.ini")
|
||||
model.Init()
|
||||
|
||||
// Debug 关闭时,切换为生产模式
|
||||
if !conf.SystemConfig.Debug {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
api := routers.InitRouter()
|
||||
|
||||
api.Run(":5000")
|
||||
|
||||
Reference in New Issue
Block a user