remove distribyted ui

This commit is contained in:
royalcat 2024-07-09 00:24:42 +03:00
parent 0371af3344
commit 93892a6f1d
62 changed files with 1 additions and 3254 deletions
src/delivery

View file

@ -28,39 +28,10 @@ func New(fc *filecache.Cache, s *torrent.Daemon, vfs vfs.Filesystem, logPath str
echopprof.Register(r)
// r.GET("/assets/*filepath", func(c *echo.Context) {
// c.FileFromFS(c.Request.URL.Path, http.FS(tstor.Assets))
// })
// t, err := vfstemplate.ParseGlob(http.FS(tstor.Templates), nil, "/templates/*")
// if err != nil {
// return fmt.Errorf("error parsing html: %w", err)
// }
// r.SetHTMLTemplate(t)
// r.GET("/", indexHandler)
// // r.GET("/routes", routesHandler(ss))
// r.GET("/logs", logsHandler)
// r.GET("/servers", serversFoldersHandler())
r.Any("/graphql", echo.WrapHandler((GraphQLHandler(s, vfs))))
// api := r.Group("/api")
// {
// api.GET("/log", apiLogHandler(logPath))
// api.GET("/status", apiStatusHandler(fc, ss))
// // api.GET("/servers", apiServersHandler(tss))
// // api.GET("/routes", apiRoutesHandler(ss))
// // api.POST("/routes/:route/torrent", apiAddTorrentHandler(s))
// // api.DELETE("/routes/:route/torrent/:torrent_hash", apiDelTorrentHandler(s))
// }
log.Info("starting webserver", "host", fmt.Sprintf("%s:%d", cfg.WebUi.IP, cfg.WebUi.Port))
// if err := r.Run(fmt.Sprintf("%s:%d", cfg.WebUi.IP, cfg.WebUi.Port)); err != nil {
// return fmt.Errorf("error initializing server: %w", err)
// }
go r.Start((fmt.Sprintf("%s:%d", cfg.WebUi.IP, cfg.WebUi.Port)))
return nil