Got Authorization flow working (Untested)
This commit is contained in:
+12
-4
@@ -1,7 +1,15 @@
|
||||
import app from "./api/server";
|
||||
import { PORT } from "./constants";
|
||||
import { engine, PORT } from "./constants";
|
||||
|
||||
Bun.serve({
|
||||
port: PORT,
|
||||
fetch: app.fetch
|
||||
});
|
||||
port: PORT,
|
||||
fetch: (req, server) => {
|
||||
const url = new URL(req.url);
|
||||
|
||||
if (url.pathname.startsWith("/socket.io/")) {
|
||||
return engine.handleRequest(req, server as any);
|
||||
}
|
||||
|
||||
return app.fetch(req, server);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user