my understanding of the steps that are supposed to work: - you setup the wsslink in
src/server/utils/api.ts
src/server/utils/api.ts
- you make a
wsServer.tsx
wsServer.tsx
file that: - defines a
ws.Server
ws.Server
- applies a
wssAdapter
wssAdapter
to the approuter defined in
src/server/api/root
src/server/api/root
- is a standalone server independendent from the next server - you start the next server - you start the websocket server (i tried with the commands in the
package.json
package.json
of both of the repos i linked above) - the trpc on the frontend of next is going to point to the websocket server - magic your trpc calls are now passed through websocket instead of HTTP
but this is what i get instead: (link: picture)
im gonna stop pulling my hair and take a break, and then i'll make a public repo with a 1:1 recreation of the steps i took on the private project im working on.
This is a project about a chat with real time functionality, implementing private and public rooms, developed with the T3 Stack for full-stack typescript development and websockets. - fimbres/t3-l...