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

Dynamic Base URL Configuration for API Endpoints at branch feature/webiu-2024 #84

Closed
sakshamgupta912 opened this issue Oct 29, 2024 · 1 comment

Comments

@sakshamgupta912
Copy link

Is your feature request related to a problem? Please describe.
I got frustrated when some system services were running on my Mac at port 5000, making it difficult to work with hardcoded API endpoints like http://localhost:5000. This situation can lead to confusion and interruptions in development. Additionally, switching environments requires manual changes to the code, increasing the likelihood of errors and complicating the development workflow.

Describe the solution you'd like
I would like to implement a feature that allows the base URL for API requests to be configured dynamically using environment files. This would involve creating an environment.ts file that holds the base URL (e.g., serverUrl) and allows components to reference this variable instead of hardcoding the URL in multiple places.

Describe alternatives you've considered
I have considered using a configuration service that fetches the appropriate API base URL from a central source, but that approach seems more complicated than simply using environment variables. Another alternative was to use a build tool to replace the URLs at build time, but this would add complexity to the build process. Using environment files is a cleaner and more manageable solution.

@sakshamgupta912
Copy link
Author

Feature added in PR #85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant