Configuring "prod"

This commit is contained in:
Deluan 2016-03-11 21:14:32 -05:00
parent d23f5ca635
commit 4b09eeccc2
3 changed files with 10 additions and 6 deletions

10
main.go
View file

@ -1,16 +1,18 @@
package main
import (
"fmt"
"github.com/astaxie/beego"
_ "github.com/deluan/gosonic/conf"
_ "github.com/deluan/gosonic/tasks"
)
func main() {
//beego.BConfig.Log.FileLineNum = false
if beego.BConfig.RunMode == "dev" {
beego.BConfig.WebConfig.DirectoryIndex = true
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
fmt.Printf("\nGoSonic v%s (%s mode)\n\n", "0.1", beego.BConfig.RunMode)
if beego.BConfig.RunMode == "prod" {
beego.SetLevel(beego.LevelInformational)
}
beego.BConfig.Log.FileLineNum = false
beego.Run()
}