ytsync/main.go

25 lines
397 B
Go
Raw Normal View History

package main
import (
"math/rand"
2020-05-19 23:13:01 +02:00
"net/http"
"time"
2021-09-27 16:11:07 +02:00
"github.com/lbryio/ytsync/v5/cmd"
2019-08-13 05:20:09 +02:00
2021-09-27 16:11:07 +02:00
"github.com/prometheus/client_golang/prometheus/promhttp"
log "github.com/sirupsen/logrus"
)
func main() {
rand.Seed(time.Now().UnixNano())
log.SetLevel(log.DebugLevel)
2021-09-27 16:11:07 +02:00
2020-05-19 23:13:01 +02:00
go func() {
2021-09-27 16:11:07 +02:00
http.Handle("/metrics", promhttp.Handler())
2020-05-19 23:13:01 +02:00
log.Error(http.ListenAndServe(":2112", nil))
}()
2021-09-27 16:11:07 +02:00
cmd.Execute()
}