add built in wisp server

This commit is contained in:
Percs 2024-07-19 16:14:43 -05:00
parent 084f2cd789
commit 3ced0defc4
4 changed files with 1611 additions and 3453 deletions

View file

@ -6,6 +6,7 @@ import fastifyStatic from "@fastify/static";
import { join } from "node:path";
import { spawn } from "node:child_process";
import { fileURLToPath } from "node:url";
import wisp from "wisp-server-node";
//transports
import { baremuxPath } from "@mercuryworkshop/bare-mux/node";
@ -32,7 +33,7 @@ const fastify = Fastify({
if (bare.shouldRoute(req)) {
bare.routeUpgrade(req, socket, head);
} else {
socket.end();
wisp.routeRequest(req, socket, head);
}
});
},