Commit cf60a3f4 authored by astaxie's avatar astaxie

warn views can't find when runmode is dev

parent 5a48c0ad
......@@ -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 {
Warn(err)
if RunMode == "dev" {
Warn(err)
}
}
BeeApp.Run()
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment