mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
fix deno.js to deploy static site
This commit is contained in:
parent
9f8edef028
commit
6e8ede8dd8
1 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,8 @@ async function handler(req){
|
||||||
let url = req.url;
|
let url = req.url;
|
||||||
let iSlash = url.indexOf('/',11);
|
let iSlash = url.indexOf('/',11);
|
||||||
let path = url.substring(iSlash+1);
|
let path = url.substring(iSlash+1);
|
||||||
|
if(path.endsWith('/'))
|
||||||
|
path = path + 'index.html';
|
||||||
return await serveFile(req, `${Deno.cwd()}/`+path);
|
return await serveFile(req, `${Deno.cwd()}/`+path);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue