feat:完善项目
This commit is contained in:
@ -2,6 +2,7 @@ package serve
|
||||
|
||||
import (
|
||||
"ArmedPolice/app"
|
||||
"ArmedPolice/app/common"
|
||||
"ArmedPolice/config"
|
||||
"ArmedPolice/lib"
|
||||
"ArmedPolice/router"
|
||||
@ -10,7 +11,6 @@ import (
|
||||
"ArmedPolice/serve/orm"
|
||||
"ArmedPolice/serve/web"
|
||||
"ArmedPolice/task"
|
||||
"ArmedPolice/tools"
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@ -21,8 +21,7 @@ type Serve struct {
|
||||
}
|
||||
|
||||
type Option struct {
|
||||
Config string `json:"config"`
|
||||
RpcConfig string `json:"rpc_config"`
|
||||
Config string `json:"config"`
|
||||
}
|
||||
|
||||
func (this *Serve) Run() {
|
||||
@ -32,11 +31,14 @@ func (this *Serve) Run() {
|
||||
obj.Upload.Exts = strings.Split(obj.Upload.Ext, ",")
|
||||
logger.NewLogger().Init(&logger.Option{File: obj.Log.File, LeastDay: obj.Log.LeastDay, Level: obj.Log.Level, IsStdout: false}).Load()
|
||||
})
|
||||
cache.Init()
|
||||
orm.Init()
|
||||
|
||||
if *config.Init {
|
||||
common.Init()
|
||||
}
|
||||
cache.Init()
|
||||
task.Init()
|
||||
app.Init()
|
||||
tools.Init()
|
||||
// 开启web
|
||||
web.NewWeb()(&web.WebConfig{
|
||||
Port: config.SettingInfo.Server.Port, ReadTimeout: config.SettingInfo.Server.ReadTimeout,
|
||||
|
Reference in New Issue
Block a user