1
2
3
4
5
6
7
8
9
10
11
12
13
import { nodeJS_dist } from "https://esm.town/v/stevekrouse/nodeJS_dist";
import LZString from "npm:lz-string";
export async function nodeJSDist(req: Request): Promise<Response> {
let url = new URL(req.url);
if (url.pathname === "/index.tab") {
return new Response(LZString.decompress(nodeJS_dist));
} else if (url.pathname === "/index.json") {
return new Response("Coming soon...");
} else {
return new Response("Not found", { status: 404 });
}
}