Finish config mapping
This commit is contained in:
@@ -3,18 +3,26 @@ package main
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/debridmediamanager.com/zurg/internal/config"
|
||||
"github.com/debridmediamanager.com/zurg/internal/dav"
|
||||
"github.com/debridmediamanager.com/zurg/internal/torrent"
|
||||
)
|
||||
|
||||
func main() {
|
||||
mux := http.NewServeMux()
|
||||
|
||||
dav.Router(mux)
|
||||
|
||||
log.Println("Listening on port 8123...")
|
||||
err := http.ListenAndServe(":8123", mux)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
c, cErr := config.LoadZurgConfig("./config.yml")
|
||||
if cErr != nil {
|
||||
log.Panicf("Config failed to load: %v", cErr)
|
||||
}
|
||||
|
||||
t := torrent.NewTorrentManager(os.Getenv("RD_TOKEN"), c)
|
||||
|
||||
// app := aero.New()
|
||||
// dav.Setup(app, c, t)
|
||||
// app.Run()
|
||||
|
||||
mux := http.NewServeMux()
|
||||
dav.Router(mux, c, t)
|
||||
http.ListenAndServe(":8123", mux)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user