-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add examples for using fetch-adapter with astro, remix and solidstart #3767
Conversation
@dtinth is attempting to deploy a commit to the trpc Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Please fix lint issues, @dtinth :) |
Thank you for the review. I will fix the lint issue when I got more time, also I will change the router import, because unlike other examples, filesystem-based router is in effect, and so the tRPC router isn't supposed to be on the |
friendly ping @dtinth :) |
@KATT Thank you for the ping. 🙏 I was swamped with events and totally forgot about it. I’ll update it today. |
Could we perhaps add #3651 in a similar fashion if the fetch adapter is the preferred way to use with SolidStart? |
I’m still updating the docs (couldn’t get my Codespaces up and running yet), but here are the example repos that shows how to integrate tRPC into Astro/Remix (see latest commit): |
should be green now 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
🎯 Changes
Both Astro and Remix use the Web Standard APIs for representing Request and Responses, so using
@trpc/server/adapters/fetch
, a tRPC router can be mounted easily without requiring any 3rd-party adapter.Note: I haven’t tested the code in isolation yet, but it is extracted from a project (Astro, Remix).
✅ Checklist