This is example for WebSocket on Next.js.
Made from this blog post: https://blog.logrocket.com/implementing-websocket-communication-next-js/
$ yarn create next-app -e https://github.com/jpedroschmitz/typescript-nextjs-starter
$ yarn add socket.io socket.io-client
res.socket.server: