Lesson 53 of 56
TypescriptWebSockets Typed with `ws`
20 minutes
Course progress95%
Install ws
npm i ws
npm i -D @types/ws
Server
import { WebSocketServer } from 'ws';
const wss = new WebSocketServer({ port: });
wss.(, {
ws.(, {
.(, msg);
ws.();
});
});