diff --git a/example/app.tsx b/example/app.tsx
new file mode 100644
index 0000000..03c2ce0
--- /dev/null
+++ b/example/app.tsx
@@ -0,0 +1,5 @@
+import React from "react";
+export default ()=>
+{
+ return
hey!
+}
\ No newline at end of file
diff --git a/example/deno.json b/example/deno.json
index 16d929c..4d1522b 100644
--- a/example/deno.json
+++ b/example/deno.json
@@ -1,6 +1,7 @@
{
"imports":
{
- "react":"https://esm.sh/preact/compat"
+ "react":"https://esm.sh/preact/compat",
+ "app": "./app.tsx"
}
}
\ No newline at end of file
diff --git a/local.tsx b/local.tsx
index dbd2d56..cbafb77 100644
--- a/local.tsx
+++ b/local.tsx
@@ -1,10 +1,10 @@
-import Setup, {Transpile, Extension} from "./serve.tsx";
+import Configure, {Transpile, Extension} from "./serve.tsx";
const SocketsLive:Set = new Set();
const SocketsSend =(inData:string)=>{ console.log(inData); for (const socket of SocketsLive){ socket.send(inData); } }
const Directory = `file://${Deno.cwd().replaceAll("\\", "/")}`;
-Setup({
+Configure({
Proxy:Directory,
SWCOp:
{
@@ -20,7 +20,7 @@ Setup({
}
}
},
- async Serve(inReq, inURL, inExt)
+ Serve(inReq, inURL, inExt, inMap)
{
if(inReq.headers.get("upgrade") == "websocket")
{
@@ -38,31 +38,27 @@ Setup({
return new Response(e);
}
}
-
+
if(!inExt)
{
- await fetch(Directory+"/deno.json");
-
- return new Response(
-`
+ return new Response
+(`
-
+
-
-`, {headers:{"content-type":"text/html"}});
+