mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 04:27:37 +03:00
25 lines
536 B
Go
25 lines
536 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/astaxie/beego"
|
|
"github.com/cloudsonic/sonic-server/conf"
|
|
_ "github.com/cloudsonic/sonic-server/init"
|
|
_ "github.com/cloudsonic/sonic-server/tasks"
|
|
)
|
|
|
|
func main() {
|
|
conf.LoadFromLocalFile()
|
|
conf.LoadFromFlags()
|
|
|
|
beego.BConfig.RunMode = conf.Sonic.RunMode
|
|
beego.BConfig.Listen.HTTPPort = conf.Sonic.Port
|
|
|
|
fmt.Printf("\nCloudSonic Server v%s (%s mode)\n\n", "0.1", beego.BConfig.RunMode)
|
|
if beego.BConfig.RunMode == "prod" {
|
|
beego.SetLevel(beego.LevelInformational)
|
|
}
|
|
|
|
beego.Run()
|
|
}
|