main.go 437 Bytes
Newer Older
wangp's avatar
wangp committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
package main

import (
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/orm"
	_ "system_pay/routers"
	"system_pay/utils"
)

func main() {

	utils.InitValidate() //验证信息的初始化定义

	if beego.BConfig.RunMode == "dev" {
		beego.BConfig.WebConfig.DirectoryIndex = true
		beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
	}

	if beego.AppConfig.String("runmode") == "dev" {
		orm.Debug = true
	}

	beego.Run()
}