Code refactoring and bump deps

This commit is contained in:
2023-04-13 11:13:40 +02:00
parent 7f602f1e20
commit 621164589f
16 changed files with 455 additions and 344 deletions

View File

@@ -1,7 +1,6 @@
package main
import (
"context"
"embed"
"flag"
"io/fs"
@@ -11,8 +10,6 @@ import (
"github.com/marcopeocchi/yt-dlp-web-ui/server/config"
)
type ContextKey interface{}
var (
port int
downloadPath string
@@ -48,9 +45,5 @@ func main() {
cfg.DownloadPath(downloadPath)
cfg.DownloaderPath(downloaderPath)
ctx := context.Background()
ctx = context.WithValue(ctx, ContextKey("port"), port)
ctx = context.WithValue(ctx, ContextKey("frontend"), frontend)
server.RunBlocking(ctx)
server.RunBlocking(port, frontend)
}