22 lines
478 B
Go
22 lines
478 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
_ "multitenantStack/routers"
|
||
|
|
||
|
"github.com/astaxie/beego"
|
||
|
"github.com/astaxie/beego/orm"
|
||
|
_ "github.com/lib/pq"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
orm.RegisterDataBase("default", "postgres", "host=127.0.0.1 port=5435 user=postgres password=postgre dbname=company_template sslmode=disable")
|
||
|
if beego.BConfig.RunMode == "dev" {
|
||
|
beego.BConfig.WebConfig.DirectoryIndex = true
|
||
|
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func main() {
|
||
|
beego.Run()
|
||
|
}
|