mirror of
https://github.com/kongyuebin1/dongfeng-pay.git
synced 2025-12-13 12:39:58 +08:00
提交新项目
This commit is contained in:
31
jhagent/main.go
Normal file
31
jhagent/main.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego"
|
||||
"github.com/astaxie/beego/orm"
|
||||
_ "juhe/jhagent/routers"
|
||||
"juhe/jhagent/sys"
|
||||
"juhe/jhagent/utils"
|
||||
"juhe/service/service_init"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// 初始化日志
|
||||
utils.InitLogs()
|
||||
|
||||
// 初始化数据库
|
||||
service_init.InitAll()
|
||||
|
||||
// 初始化Session
|
||||
sys.InitSession()
|
||||
|
||||
// 如果是开发模式,则显示命令信息
|
||||
isDev := !(beego.AppConfig.String("runmode") != "dev")
|
||||
if isDev {
|
||||
orm.Debug = isDev
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
beego.Run()
|
||||
}
|
||||
Reference in New Issue
Block a user