-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
feat(nx-plugin): TRPC using base url depending on the provider #574
Conversation
✅ Deploy Preview for analog-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for analog-app ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for analog-blog ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I really like this! Maybe this should be exposed as a function of the trpc package instead of the Nx plugin template? |
@goetzrobin That sounds like a good idea. However, before implementing it into the 'trpc' package, we should take a look at resolving the following issue: #468. This precautionary step is necessary to ensure that we don't introduce any breaking changes, especially if addressing the issue requires making additional changes to the way the API is passed along. By doing this, we can assist the users while still retaining the flexibility to make changes to the 'trpc' package in the future. |
Closing as resolved via #639 which will go out with the next release |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Which package are you modifying?
What is the current behavior?
In the current implementation, the app defaults to running trpc on http://127.0.0.1:4200/. To enhance flexibility and accommodate different hosting providers, this pull request introduces a getBaseUrl function. With this update, the trpc endpoint can be easily adjusted based on the hosting environment. Changing the port or any other configurations will now be automatically resolved, providing a more adaptable and seamless experience.
This change aims to improve the app's configurability and ensure smoother deployments across various hosting setups. Your review and feedback on this pull request would be highly appreciated. Thank you!
Closes #
What is the new behavior?
Does this PR introduce a breaking change?
Other information
[optional] What gif best describes this PR or how it makes you feel?