mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 12:50:55 +00:00
warn views can't find when runmode is dev
This commit is contained in:
parent
5a48c0ad03
commit
cf60a3f463
6
beego.go
6
beego.go
@ -52,7 +52,7 @@ func init() {
|
||||
HttpAddr = ""
|
||||
HttpPort = 8080
|
||||
AppName = "beego"
|
||||
RunMode = "prod" //default runmod
|
||||
RunMode = "dev" //default runmod
|
||||
AutoRender = true
|
||||
RecoverPanic = true
|
||||
PprofOn = false
|
||||
@ -80,7 +80,7 @@ func init() {
|
||||
if runmode := AppConfig.String("runmode"); runmode != "" {
|
||||
RunMode = runmode
|
||||
} else {
|
||||
RunMode = "prod"
|
||||
RunMode = "dev"
|
||||
}
|
||||
if ar, err := AppConfig.Bool("autorender"); err != nil {
|
||||
AutoRender = true
|
||||
@ -245,7 +245,9 @@ func Run() {
|
||||
}
|
||||
err := BuildTemplate(ViewsPath)
|
||||
if err != nil {
|
||||
if RunMode == "dev" {
|
||||
Warn(err)
|
||||
}
|
||||
}
|
||||
BeeApp.Run()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user