t3 app with a need for a REST API reached by other locations

Hello, everyone! I currently have finished work on a t3 app and everything is setup as per the client needs. (It is a small dashboard app for managing a few business-side tasks). Everything is amazing so far and I've loved working with t3 in prod. However my client now has come with a new request: Some of the resources needs to be reached from outside locations (2 other websites) through a REST API to be used just for display. (Simple GET requests). So right now I'm thinking if I should implement the logic in a NestJS or a simple Express app and have the external locations reach those endpoints or try and force tRPC to work with CORS. (I know that the point of tRPC is obviously not that but I just want to know if the dev experience is going to be okay) As a footnote, I wanted to mention that the endpoints, reached by the external location may need to be expanded further down the line and more functionality to be added, so maintaining the two codebases (the t3 app and the potential backend app) will definitely be a small issue. Thank you in advance for any help and responses!
3 Replies
Neto
Neto2y ago
you don't need that you can use an plugin for expose an openapi spec for trpc
Neto
Neto2y ago
GitHub
GitHub - jlalmes/trpc-openapi: OpenAPI support for tRPC 🧩
OpenAPI support for tRPC 🧩. Contribute to jlalmes/trpc-openapi development by creating an account on GitHub.
martinpopoff
martinpopoffOP2y ago
damn, that looks exactly like what I need, thanks a lot! will check it out for sure
Want results from more Discord servers?
Add your server