quintodrome/main.go

28 lines
513 B
Go
Raw Normal View History

2016-02-23 14:41:35 -09:00
package main
import (
2020-01-24 19:42:47 -09:00
"fmt"
2020-01-23 15:44:08 -09:00
"github.com/deluan/navidrome/conf"
"github.com/deluan/navidrome/server"
2020-01-24 19:42:47 -09:00
"github.com/deluan/navidrome/static"
2016-02-23 14:41:35 -09:00
)
2020-01-24 19:42:47 -09:00
func ShowBanner() {
banner, _ := static.Asset("banner.txt")
fmt.Printf(string(banner), server.Version)
}
2016-02-23 14:41:35 -09:00
func main() {
2020-01-08 06:25:23 -09:00
conf.Load()
2016-03-29 20:05:57 -08:00
2020-01-23 21:29:31 -09:00
if !conf.Server.DevDisableBanner {
2020-01-24 19:42:47 -09:00
ShowBanner()
2020-01-20 13:35:04 -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
}