Configuring "prod"
This commit is contained in:
Executable
+3
@@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
BEEGO_RUNMODE=prod ./gosonic
|
||||||
+1
-2
@@ -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]
|
||||||
|
|||||||
@@ -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()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user