mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 06:20:02 -04:00
add built in wisp server
This commit is contained in:
parent
084f2cd789
commit
3ced0defc4
4 changed files with 1611 additions and 3453 deletions
|
@ -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);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue