From 6e8ede8dd8f30f603a9cbff8e066f23a4ed2a13d Mon Sep 17 00:00:00 2001 From: James Feng Cao Date: Sun, 17 Mar 2024 13:31:45 +0800 Subject: [PATCH] fix deno.js to deploy static site --- js/deno.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/deno.js b/js/deno.js index 5e0f54f..0436fa6 100644 --- a/js/deno.js +++ b/js/deno.js @@ -3,6 +3,8 @@ async function handler(req){ let url = req.url; let iSlash = url.indexOf('/',11); let path = url.substring(iSlash+1); + if(path.endsWith('/')) + path = path + 'index.html'; return await serveFile(req, `${Deno.cwd()}/`+path); };