mirror of
https://github.com/kongyuebin1/dongfeng-pay.git
synced 2024-11-14 22:49:21 +08:00
29 lines
435 B
Go
29 lines
435 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"github.com/beego/beego/v2/client/orm"
|
||
|
beego "github.com/beego/beego/v2/server/web"
|
||
|
_ "merchant/models"
|
||
|
_ "merchant/routers"
|
||
|
"merchant/sys"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
|
||
|
// 初始化数据库
|
||
|
|
||
|
// 初始化Session
|
||
|
sys.InitSession()
|
||
|
|
||
|
// 如果是开发模式,则显示命令信息
|
||
|
s, _ := beego.AppConfig.String("runmode")
|
||
|
isDev := !(s != "dev")
|
||
|
if isDev {
|
||
|
orm.Debug = isDev
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func main() {
|
||
|
beego.Run()
|
||
|
}
|