Initial commit 🌈

This commit is contained in:
Ben Sarmiento
2023-10-16 21:31:51 +02:00
commit da2c53bf86
15 changed files with 802 additions and 0 deletions

26
cmd/zurg/main.go Normal file
View File

@@ -0,0 +1,26 @@
package main
import (
"log"
"net/http"
"os"
"github.com/debridmediamanager.com/zurg/internal/dav"
"github.com/debridmediamanager.com/zurg/pkg/repo"
)
func main() {
mux := http.NewServeMux()
db, dbErr := repo.NewDatabase(os.Getenv("DB_DSN"))
if dbErr != nil {
log.Println(dbErr)
}
dav.Router(mux, db)
log.Println("Listening on port 8123...")
err := http.ListenAndServe(":8123", mux)
if err != nil {
log.Println(err)
}
}