mirror of
https://github.com/beego/bee.git
synced 2024-11-21 18:40:54 +00:00
commit
0d739375d1
@ -99,7 +99,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
orm.RegisterDataBase("default", "{{.DriverName}}", beego.AppConfig.String("sqlconn"))
|
sqlConn,err := beego.AppConfig.String("sqlconn")
|
||||||
|
if err != nil {
|
||||||
|
beeLogger.Log.Fatal("%s", err)
|
||||||
|
}
|
||||||
|
orm.RegisterDataBase("default", "{{.DriverName}}", sqlConn)
|
||||||
if beego.BConfig.RunMode == "dev" {
|
if beego.BConfig.RunMode == "dev" {
|
||||||
beego.BConfig.WebConfig.DirectoryIndex = true
|
beego.BConfig.WebConfig.DirectoryIndex = true
|
||||||
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
|
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
|
||||||
|
Loading…
Reference in New Issue
Block a user