Skip to content

Commit

Permalink
chore: cleanup ws playground
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Sep 14, 2023
1 parent 9441b36 commit 701e38f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
2 changes: 1 addition & 1 deletion playground/modules/ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export default defineNuxtModule({

nuxt.hook('listen', (server) => {
server.on('upgrade', (req, socket, head) => {
console.log(`[server] WebSocket upgrade for path: ${req.url}`)
if (req.url === '/api/ws') {
console.log(`[server] WebSocket upgrade for path: ${req.url}`)
return wss.handleUpgrade(req, socket, head, (ws) => {
wss.emit('connection', ws, req)
})
Expand Down
20 changes: 0 additions & 20 deletions playground/server/ws.ts

This file was deleted.

0 comments on commit 701e38f

Please sign in to comment.