Skip to content
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

Merged
merged 5 commits into from
Mar 5, 2023

Conversation

dtinth
Copy link
Contributor

@dtinth dtinth commented Feb 14, 2023

🎯 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

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

@dtinth dtinth requested a review from a team as a code owner February 14, 2023 02:36
@vercel
Copy link

vercel bot commented Feb 14, 2023

@dtinth is attempting to deploy a commit to the trpc Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Feb 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
www ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 5, 2023 at 6:45PM (UTC)

KATT
KATT previously approved these changes Feb 14, 2023
@KATT
Copy link
Member

KATT commented Feb 14, 2023

Please fix lint issues, @dtinth :)

@dtinth
Copy link
Contributor Author

dtinth commented Feb 15, 2023

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 routes/pages directory.

@dtinth dtinth marked this pull request as draft February 15, 2023 14:23
@KATT
Copy link
Member

KATT commented Mar 3, 2023

friendly ping @dtinth :)

@dtinth
Copy link
Contributor Author

dtinth commented Mar 3, 2023

@KATT Thank you for the ping. 🙏 I was swamped with events and totally forgot about it. I’ll update it today.

@juliusmarminge
Copy link
Member

Could we perhaps add #3651 in a similar fashion if the fetch adapter is the preferred way to use with SolidStart?

@juliusmarminge juliusmarminge mentioned this pull request Mar 3, 2023
3 tasks
@dtinth
Copy link
Contributor Author

dtinth commented Mar 3, 2023

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):

@dtinth
Copy link
Contributor Author

dtinth commented Mar 3, 2023

should be green now 😃

Copy link
Member

@juliusmarminge juliusmarminge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@juliusmarminge juliusmarminge changed the title [Docs] Add examples for integrating with Astro (SSR mode) and Remix (without 3rd party libs) docs: add examples for using fetch-adapter with astro, remix and solidstart Mar 5, 2023
@juliusmarminge juliusmarminge merged commit 290806d into trpc:main Mar 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🕸 www Stuff to do with the website (`/www` folder)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants