examples/next-sse-chat/README.md
This example showcases the use of httpSubscriptionLink to facilitate .useSubscription via Server-sent Events.
Try demo http://sse.trpc.io/
This project includes 2 examples of the subscription pattern:
whoIsTypinglivePoststrpc.{x}.useSubscription) can be found in /src/app/channels/[channelId]/hooks.tsEventEmitter & whoIsTyping subscription route can be found in /src/server/routers/channel.tspost subscription route can be found in /src/server/routers/post.tsgit clone [email protected]:trpc/examples-next-sse-chat.git
pnpm i
cp .env.example .env
pnpm dev