2018-11-06 11:31:49 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
_ "multitenantStack/routers"
|
2018-11-08 10:21:06 +00:00
|
|
|
companydb "multitenantStack/services/companydb"
|
2018-11-12 10:42:39 +00:00
|
|
|
"multitenantStack/services/tokenTools"
|
2018-11-07 19:13:26 +00:00
|
|
|
"time"
|
2018-11-06 11:31:49 +00:00
|
|
|
|
|
|
|
"github.com/astaxie/beego"
|
|
|
|
"github.com/astaxie/beego/orm"
|
|
|
|
_ "github.com/lib/pq"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2018-11-08 10:21:06 +00:00
|
|
|
tokenTools.InitTokenToolsService()
|
|
|
|
companydb.InitCompanyDBService()
|
2018-11-07 19:13:26 +00:00
|
|
|
orm.DefaultTimeLoc = time.UTC
|
2018-11-06 11:31:49 +00:00
|
|
|
if beego.BConfig.RunMode == "dev" {
|
|
|
|
beego.BConfig.WebConfig.DirectoryIndex = true
|
|
|
|
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
|
2018-11-08 07:36:08 +00:00
|
|
|
orm.Debug = true
|
2018-11-06 11:31:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
beego.Run()
|
|
|
|
}
|