mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 04:27:37 +03:00
27 lines
574 B
Go
27 lines
574 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/deluan/navidrome/conf"
|
|
"github.com/deluan/navidrome/consts"
|
|
"github.com/deluan/navidrome/db"
|
|
)
|
|
|
|
func main() {
|
|
if !conf.Server.DevDisableBanner {
|
|
println(consts.Banner())
|
|
}
|
|
|
|
conf.Load()
|
|
db.EnsureLatestVersion()
|
|
|
|
subsonic, err := CreateSubsonicAPIRouter()
|
|
if err != nil {
|
|
panic(fmt.Sprintf("Could not create the Subsonic API router. Aborting! err=%v", err))
|
|
}
|
|
a := CreateServer(conf.Server.MusicFolder)
|
|
a.MountRouter("/rest", subsonic)
|
|
a.MountRouter("/app", CreateAppRouter("/app"))
|
|
a.Run(":" + conf.Server.Port)
|
|
}
|