diff --git a/config/default.toml b/config/default.toml index bc05c2f..7977b21 100644 --- a/config/default.toml +++ b/config/default.toml @@ -22,7 +22,7 @@ ump = false [jobs.youtube_session] po_token_enabled = true -frequency = "*/5 * * * *" +frequency = "*/1 * * * *" [youtube_session] oauth_enabled = false diff --git a/src/main.ts b/src/main.ts index b1352ec..b67029d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -115,23 +115,22 @@ app.use("*", async (c, next) => { routes(app, konfigStore); const https = Deno.env.get("HTTPS"); +const port = konfigStore.get("server.port") as number; +const host = konfigStore.get("server.host") as string; + if (https == "TRUE" || https == "true") { const cert = Deno.readTextFileSync("/data/cert.pem"); const key = Deno.readTextFileSync("/data/key.key"); Deno.serve({ - port: Number(Deno.env.get("PORT")) || - konfigStore.get("server.port") as number, - hostname: Deno.env.get("HOST") || - konfigStore.get("server.host") as string, + port: port, + hostname: host, cert: cert, key: key, }, app.fetch); } else { Deno.serve({ - port: Number(Deno.env.get("PORT")) || - konfigStore.get("server.port") as number, - hostname: Deno.env.get("HOST") || - konfigStore.get("server.host") as string, + port: port, + hostname: host, }, app.fetch); }