working on replies

This commit is contained in:
2026-04-15 06:05:46 +00:00
parent 0d392c90cc
commit c1de283fb6
15 changed files with 436 additions and 211 deletions

View File

@@ -360,11 +360,15 @@ async function main() {
messageDispatch.set('hello2', hello2Handler);
messageDispatch.set('peer_message', peerMessageHandler);
const port = parseInt(Deno.env.get("PORT") ?? "443");
const certFile = Deno.env.get("TLS_CERT") ?? "/etc/letsencrypt/live/ddln.app/fullchain.pem";
const keyFile = Deno.env.get("TLS_KEY") ?? "/etc/letsencrypt/live/ddln.app/privkey.pem";
Deno.serve({
hostname: "[::]",
port: 443,
cert: Deno.readTextFileSync("/etc/letsencrypt/live/ddln.app/fullchain.pem"),
key: Deno.readTextFileSync("/etc/letsencrypt/live/ddln.app/privkey.pem"),
port,
cert: Deno.readTextFileSync(certFile),
key: Deno.readTextFileSync(keyFile),
}, handler);
await devServerWatchFiles();