mirror of
https://github.com/navidrome/navidrome.git
synced 2025-08-10 00:52:20 +00:00
Configuring "prod"
This commit is contained in:
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
|
||||
autoRender = false
|
||||
copyRequestBody = true
|
||||
enableAdmin = false
|
||||
enableAdmin = true
|
||||
|
||||
apiVersion = 1.5.0
|
||||
ignoredArticles="The El La Los Las Le Les Os As O A"
|
||||
@@ -21,7 +21,6 @@ plsIgnoredPatterns = ^iCloud;^CDs para;^Skipped;Christian
|
||||
|
||||
[dev]
|
||||
disableValidation = true
|
||||
enableDownsampling = true
|
||||
enableAdmin = true
|
||||
|
||||
[test]
|
||||
|
||||
10
main.go
10
main.go
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user