1- // @ts -check
21import http from "node:http"
32import path from "node:path"
43import { createBareServer } from "@tomphttp/bare-server-node"
54import cors from "cors"
65import express from "express"
76import basicAuth from "express-basic-auth"
8- import wisp from "wisp-server-node"
9- import { libcurlPath } from "@mercuryworkshop/libcurl-transport"
107import config from "./config.js"
118
129const __dirname = process . cwd ( )
@@ -31,7 +28,6 @@ app.use(express.json())
3128app . use ( express . urlencoded ( { extended : true } ) )
3229app . use ( cors ( ) )
3330app . use ( express . static ( path . join ( __dirname , "static" ) ) )
34- app . use ( "/libcurl/" , express . static ( libcurlPath ) )
3531
3632const routes = [
3733 { path : "/as" , file : "apps.html" } ,
@@ -98,8 +94,6 @@ server.on("request", (req, res) => {
9894server . on ( "upgrade" , ( req , socket , head ) => {
9995 if ( bareServer . shouldRoute ( req ) ) {
10096 bareServer . routeUpgrade ( req , socket , head )
101- } else if ( req . url ?. endsWith ( "/u/" ) ) {
102- wisp . routeRequest ( req , socket , head )
10397 } else {
10498 socket . end ( )
10599 }
0 commit comments