navidrome/main.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
556 B
Go
Raw Normal View History

2016-02-24 00:41:35 +01:00
package main
import (
"fmt"
2020-01-24 01:44:08 +01:00
"github.com/deluan/navidrome/conf"
"github.com/deluan/navidrome/consts"
"github.com/deluan/navidrome/db"
2016-02-24 00:41:35 +01:00
)
func main() {
2020-03-22 06:13:55 +01:00
println(consts.Banner())
2020-01-20 23:35:04 +01:00
conf.Load()
db.EnsureLatestVersion()
subsonic, err := CreateSubsonicAPIRouter()
if err != nil {
panic(fmt.Sprintf("Could not create the Subsonic API router. Aborting! err=%v", err))
}
2020-01-24 07:29:31 +01:00
a := CreateServer(conf.Server.MusicFolder)
2020-04-03 23:50:42 +02:00
a.MountRouter(consts.URLPathSubsonicAPI, subsonic)
a.MountRouter(consts.URLPathUI, CreateAppRouter())
2020-01-24 07:29:31 +01:00
a.Run(":" + conf.Server.Port)
2016-02-24 00:41:35 +01:00
}