Skip to content

Commit

Permalink
fix server upgrade websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
Luna-devv committed Apr 15, 2023
1 parent 422599a commit 719c598
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { http, ws, error, proxy } from './handlers';
proxy.on('error', error.send);
const server = node_proxy.createServer(http.handle);

server.on('upgrade', (req, socket, head) => ws.handle);
server.on('upgrade', ws.handle);

server.listen(Config.port.http, () => {
console.log(`\x1b[33mHTTP (server) running on port ${Config.port.http}\x1b[0m`);
Expand Down

0 comments on commit 719c598

Please sign in to comment.