1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-28 20:44:13 +00:00

improve parseconfig

This commit is contained in:
astaxie 2013-05-07 23:16:56 +08:00
parent c048efbbf8
commit 581bb65bbc

View File

@ -180,12 +180,14 @@ func FilterPrefixPath(path string, filter http.HandlerFunc) *App {
}
func Run() {
if AppConfigPath != path.Join(AppPath, "conf", "app.conf") {
err := ParseConfig()
if err != nil {
if RunMode == "dev" {
Warn(err)
}
}
}
if PprofOn {
BeeApp.Router(`/debug/pprof`, &ProfController{})
BeeApp.Router(`/debug/pprof/:pp([\w]+)`, &ProfController{})
@ -194,7 +196,7 @@ func Run() {
GlobalSessions, _ = session.NewManager(SessionProvider, SessionName, SessionGCMaxLifetime, SessionSavePath)
go GlobalSessions.GC()
}
err = BuildTemplate(ViewsPath)
err := BuildTemplate(ViewsPath)
if err != nil {
if RunMode == "dev" {
Warn(err)