Update WebSocket server; still not serving HTML

This commit is contained in:
Hri7566 2023-09-07 21:38:05 -04:00
parent f3317c2a0a
commit d5cfe41c6a
3 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,6 @@
import env from "~/util/env";
import { app } from "~/ws/server";
import { Logger } from "~/util/Logger";
import env from "./util/env";
import { app } from "./ws/server";
import { Logger } from "./util/Logger";
const logger = new Logger("Main");

View File

@ -5,7 +5,11 @@ import { createUserID } from "../util/id";
const logger = new Logger("WebSocket Server");
export const app = App()
.get("/", (res, req) => {})
.get("/", (res, req) => {
const url = req.getUrl();
logger.debug(`${req.getMethod()} ${url} ${req}`);
res.writeStatus(`200 OK`).end("HI!");
})
.ws("/*", {
idleTimeout: 30,
maxBackpressure: 1024,