Skip to content

Commit

Permalink
fix: 🐛 debug step 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Katze719 committed Sep 5, 2024
1 parent 7787721 commit ebcf026
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions fresh.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,21 @@ import { defineConfig } from "$fresh/server.ts";

const port = Number(Deno.env.get("DENO_PORT")) || 8000;

const certFile = Deno.env.get("DENO_CERTFILE") || undefined;
const keyFile = Deno.env.get("DENO_KEYFILE") || undefined;
const certFile = Deno.env.get("DENO_CERTFILE");
const keyFile = Deno.env.get("DENO_KEYFILE");

if (certFile && keyFile) {
try {
await Deno.stat(certFile);
await Deno.stat(keyFile);
} catch (error) {
console.error("Error accessing certificate or key file:", error);
Deno.exit(1);
}
} else {
console.error("Cert file or key file not specified.");
Deno.exit(1);
}

export default defineConfig({
port: port,
Expand Down

0 comments on commit ebcf026

Please sign in to comment.