2016-02-23 14:41:35 -09:00
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
2020-01-23 15:44:08 -09:00
|
|
|
"github.com/deluan/navidrome/conf"
|
2020-02-04 06:14:53 -09:00
|
|
|
"github.com/deluan/navidrome/consts"
|
2020-01-28 04:22:17 -09:00
|
|
|
"github.com/deluan/navidrome/db"
|
2016-02-23 14:41:35 -09:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func main() {
|
2020-01-23 21:29:31 -09:00
|
|
|
if !conf.Server.DevDisableBanner {
|
2020-02-04 06:14:53 -09:00
|
|
|
println(consts.Banner())
|
2020-01-20 13:35:04 -09:00
|
|
|
}
|
|
|
|
|
|
2020-01-26 12:21:07 -09:00
|
|
|
conf.Load()
|
2020-02-01 09:46:03 -09:00
|
|
|
db.EnsureLatestVersion()
|
2020-01-26 12:21:07 -09:00
|
|
|
|
2020-01-23 21:29:31 -09:00
|
|
|
a := CreateServer(conf.Server.MusicFolder)
|
2020-01-19 15:34:54 -09:00
|
|
|
a.MountRouter("/rest", CreateSubsonicAPIRouter())
|
|
|
|
|
a.MountRouter("/app", CreateAppRouter("/app"))
|
2020-01-23 21:29:31 -09:00
|
|
|
a.Run(":" + conf.Server.Port)
|
2016-02-23 14:41:35 -09:00
|
|
|
}
|