mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 20:47:35 +03:00
25 lines
503 B
Go
25 lines
503 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/astaxie/beego"
|
|
"github.com/deluan/gosonic/conf"
|
|
_ "github.com/deluan/gosonic/init"
|
|
_ "github.com/deluan/gosonic/tasks"
|
|
)
|
|
|
|
func main() {
|
|
conf.LoadFromLocalFile()
|
|
conf.LoadFromFlags()
|
|
|
|
beego.BConfig.RunMode = conf.GoSonic.RunMode
|
|
beego.BConfig.Listen.HTTPPort = conf.GoSonic.Port
|
|
|
|
fmt.Printf("\nGoSonic v%s (%s mode)\n\n", "0.1", beego.BConfig.RunMode)
|
|
if beego.BConfig.RunMode == "prod" {
|
|
beego.SetLevel(beego.LevelInformational)
|
|
}
|
|
|
|
beego.Run()
|
|
}
|