load port and host from config file
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
This commit is contained in:
parent
c6f6f07fdf
commit
297a430503
2 changed files with 8 additions and 9 deletions
|
@ -22,7 +22,7 @@ ump = false
|
||||||
|
|
||||||
[jobs.youtube_session]
|
[jobs.youtube_session]
|
||||||
po_token_enabled = true
|
po_token_enabled = true
|
||||||
frequency = "*/5 * * * *"
|
frequency = "*/1 * * * *"
|
||||||
|
|
||||||
[youtube_session]
|
[youtube_session]
|
||||||
oauth_enabled = false
|
oauth_enabled = false
|
||||||
|
|
15
src/main.ts
15
src/main.ts
|
@ -115,23 +115,22 @@ app.use("*", async (c, next) => {
|
||||||
|
|
||||||
routes(app, konfigStore);
|
routes(app, konfigStore);
|
||||||
const https = Deno.env.get("HTTPS");
|
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") {
|
if (https == "TRUE" || https == "true") {
|
||||||
const cert = Deno.readTextFileSync("/data/cert.pem");
|
const cert = Deno.readTextFileSync("/data/cert.pem");
|
||||||
const key = Deno.readTextFileSync("/data/key.key");
|
const key = Deno.readTextFileSync("/data/key.key");
|
||||||
Deno.serve({
|
Deno.serve({
|
||||||
port: Number(Deno.env.get("PORT")) ||
|
port: port,
|
||||||
konfigStore.get("server.port") as number,
|
hostname: host,
|
||||||
hostname: Deno.env.get("HOST") ||
|
|
||||||
konfigStore.get("server.host") as string,
|
|
||||||
cert: cert,
|
cert: cert,
|
||||||
key: key,
|
key: key,
|
||||||
}, app.fetch);
|
}, app.fetch);
|
||||||
} else {
|
} else {
|
||||||
Deno.serve({
|
Deno.serve({
|
||||||
port: Number(Deno.env.get("PORT")) ||
|
port: port,
|
||||||
konfigStore.get("server.port") as number,
|
hostname: host,
|
||||||
hostname: Deno.env.get("HOST") ||
|
|
||||||
konfigStore.get("server.host") as string,
|
|
||||||
}, app.fetch);
|
}, app.fetch);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue