Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/tellytv/telly into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiet480 committed Aug 22, 2018
2 parents 2130ad6 + a8e1769 commit 3f5255c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"strings"
"time"

"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"github.com/gobuffalo/packr"
ssdp "github.com/koron/go-ssdp"
Expand All @@ -35,6 +36,7 @@ func serve(lineup *lineup) {
}

router := gin.New()
router.Use(cors.Default())
router.Use(gin.Recovery())

if viper.GetBool("log.logrequests") {
Expand Down Expand Up @@ -100,6 +102,7 @@ func serve(lineup *lineup) {
log.Infof("telly is live and on the air!")
log.Infof("Broadcasting from http://%s/", viper.GetString("web.listen-address"))
log.Infof("EPG URL: http://%s/epg.xml", viper.GetString("web.listen-address"))

if err := router.Run(viper.GetString("web.listen-address")); err != nil {
log.WithError(err).Panicln("Error starting up web server")
}
Expand Down

0 comments on commit 3f5255c

Please sign in to comment.