Skip to content

Commit 4852a5d

Browse files
Bug Fixes
1 parent 76a0b34 commit 4852a5d

35 files changed

+3167
-5379
lines changed

index.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,26 @@
1-
import { createBareServer } from "@nebula-services/bare-server-node";
21
import express from "express";
32
import { createServer } from "node:http";
43
import path from "path";
54
import fs from "fs";
65
import { fileURLToPath } from "url";
7-
import wisp from "wisp-server-node";
6+
import { server as wisp } from "@mercuryworkshop/wisp-js";
87
import "ws";
98

109
console.log("Starting Terbium...");
1110
const app = express();
12-
const bare = createBareServer('/bare/')
1311
const __filename = fileURLToPath(import.meta.url);
1412
const __dirname = path.dirname(__filename);
1513

1614
app.use(express.static("static"));
1715
const server = createServer();
1816

1917
server.on("request", (req, res) => {
20-
if (bare.shouldRoute(req)) {
21-
bare.routeRequest(req, res);
22-
} else {
23-
app(req, res);
24-
}
18+
app(req, res);
2519
});
2620

2721
server.on("upgrade", (req, socket, head) => {
2822
if (req.url.endsWith("/wisp/")) {
2923
wisp.routeRequest(req, socket, head);
30-
} else if (req.url.endsWith("/bare")) {
31-
bare.routeUpgrade(req, socket, head);
3224
}
3325
});
3426

0 commit comments

Comments
 (0)