wip fix
This commit is contained in:
parent
9b9e43baaf
commit
42c1793880
|
|
@ -1,10 +1,30 @@
|
||||||
|
import { dir } from "dir";
|
||||||
import { apiContext } from "service-srv";
|
import { apiContext } from "service-srv";
|
||||||
|
|
||||||
export const _ = {
|
export const _ = {
|
||||||
url: "/deploy/**",
|
url: "/deploy/**",
|
||||||
async api() {
|
async api() {
|
||||||
const { req, res } = apiContext(this);
|
const { req, res } = apiContext(this);
|
||||||
return "rukausfb";
|
|
||||||
},
|
const pathname = req.params["*"];
|
||||||
};
|
if (pathname === "index.html" || pathname === "_") {
|
||||||
|
return new Response(
|
||||||
|
`\
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title></title>
|
||||||
|
<link rel="stylesheet" href="https://prasi.app/index.css">
|
||||||
|
</head>
|
||||||
|
<body class="flex-col flex-1 w-full min-h-screen flex opacity-0">
|
||||||
|
<div id="root"></div>
|
||||||
|
<script src="/deploy/main.js" type="module"></script>
|
||||||
|
</body>
|
||||||
|
</html>`,
|
||||||
|
{ headers: { "content-type": "text/html" } }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ export const serveAPI = {
|
||||||
found = null;
|
found = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(found?.fn.toString());
|
|
||||||
|
|
||||||
if (found) {
|
if (found) {
|
||||||
const params = { ...found.params };
|
const params = { ...found.params };
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue