Configuring "prod"
This commit is contained in:
parent
d23f5ca635
commit
4b09eeccc2
3 changed files with 10 additions and 6 deletions
3
bin/start.sh
Executable file
3
bin/start.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
BEEGO_RUNMODE=prod ./gosonic
|
||||||
|
|
@ -4,7 +4,7 @@ httpPort = 8080
|
||||||
runMode = dev
|
runMode = dev
|
||||||
autoRender = false
|
autoRender = false
|
||||||
copyRequestBody = true
|
copyRequestBody = true
|
||||||
enableAdmin = false
|
enableAdmin = true
|
||||||
|
|
||||||
apiVersion = 1.5.0
|
apiVersion = 1.5.0
|
||||||
ignoredArticles="The El La Los Las Le Les Os As O A"
|
ignoredArticles="The El La Los Las Le Les Os As O A"
|
||||||
|
|
@ -21,7 +21,6 @@ plsIgnoredPatterns = ^iCloud;^CDs para;^Skipped;Christian
|
||||||
|
|
||||||
[dev]
|
[dev]
|
||||||
disableValidation = true
|
disableValidation = true
|
||||||
enableDownsampling = true
|
|
||||||
enableAdmin = true
|
enableAdmin = true
|
||||||
|
|
||||||
[test]
|
[test]
|
||||||
|
|
|
||||||
10
main.go
10
main.go
|
|
@ -1,16 +1,18 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
"github.com/astaxie/beego"
|
"github.com/astaxie/beego"
|
||||||
_ "github.com/deluan/gosonic/conf"
|
_ "github.com/deluan/gosonic/conf"
|
||||||
_ "github.com/deluan/gosonic/tasks"
|
_ "github.com/deluan/gosonic/tasks"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
//beego.BConfig.Log.FileLineNum = false
|
fmt.Printf("\nGoSonic v%s (%s mode)\n\n", "0.1", beego.BConfig.RunMode)
|
||||||
if beego.BConfig.RunMode == "dev" {
|
if beego.BConfig.RunMode == "prod" {
|
||||||
beego.BConfig.WebConfig.DirectoryIndex = true
|
beego.SetLevel(beego.LevelInformational)
|
||||||
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
|
|
||||||
}
|
}
|
||||||
|
beego.BConfig.Log.FileLineNum = false
|
||||||
beego.Run()
|
beego.Run()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue