multitenantStack/main.go

26 lines
550 B
Go
Raw Normal View History

2018-11-06 11:31:49 +00:00
package main
import (
_ "multitenantStack/routers"
auth "multitenantStack/services"
"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-07 19:23:46 +00:00
orm.RegisterDataBase("default", "postgres", "host=127.0.0.1 port=5435 user=postgres password=postgre sslmode=disable")
auth.InitJWTService()
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"
}
}
func main() {
beego.Run()
}