import { type RawData, WebSocketServer } from 'ws'
-import { type DataPayload, type MessagePayload, MessageType } from './types.js'
+
import { requestHandlerPool } from './pool.js'
+import { type DataPayload, type MessagePayload, MessageType } from './types.js'
const port = 8080
const wss = new WebSocketServer({ port }, () => {
console.info(
- `⚡️[ws server]: WebSocket server is started at http://localhost:${port}/`
+ `⚡️[ws server]: WebSocket server is started at ws://localhost:${port}/`
)
})
const emptyFunction = (): void => {
- /** Intentional */
+ /* Intentional */
}
wss.on('connection', ws => {
data: response.data
})
)
- return null
+ return undefined
})
.catch(emptyFunction)
break
data: response.data
})
)
- return null
+ return undefined
})
.catch(emptyFunction)
break