We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6ea305 commit 93b458bCopy full SHA for 93b458b
src/index.ts
@@ -56,14 +56,11 @@ async function mainSse()
56
const PORT = process.env.PORT || 3001;
57
58
const server = app.listen(PORT, () => {
59
- console.log(`✅ Server is running at http://localhost:${PORT}`);
+ //console.log(`✅ Server is running at http://localhost:${PORT}`);
60
});
61
62
server.on('upgrade', (request, socket, head) => {
63
- console.log(request.headers.host);
64
- console.log(request.url);
65
const pathname = new URL(request.url!, `http://${request.headers.host}`).pathname;
66
- console.log(pathname);
67
if (pathname === '/ws') {
68
wss.handleUpgrade(request, socket, head, (ws) => {
69
wss.emit('connection', ws, request);
0 commit comments