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

Allow the host and clientHost to be changed at runtime #482

Open
4ndre4s opened this issue Apr 22, 2024 · 2 comments
Open

Allow the host and clientHost to be changed at runtime #482

4ndre4s opened this issue Apr 22, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@4ndre4s
Copy link

4ndre4s commented Apr 22, 2024

Your use case

To run the same version of a software on different environments (dev, qa, prod) without rebuilding, it would be very helpful if you could provide the configuration for the host and clientHost at runtime (startup). Currently, this happens at build time.

The solution you'd like

Nuxt offers a way for that: https://nuxt.com/docs/guide/going-further/runtime-config#environment-variables

Instead of reading environment variables at build time, relay on runtimeConfig (by convention) on runtime.

Possible alternatives

No response

Additional information

maybe that is already possible and just not documented?

@4ndre4s 4ndre4s added the enhancement New feature or request label Apr 22, 2024
@4ndre4s 4ndre4s changed the title Allow the host and client host to be changed at runtime Allow the host and clientHost to be changed at runtime Apr 22, 2024
@Diizzayy
Copy link
Owner

@4ndre4s This can be achieved via the useGqlHost composable, more information here: https://nuxt-graphql-client.web.app/getting-started/composables#usegqlhost

@4ndre4s
Copy link
Author

4ndre4s commented May 11, 2024

Thanks for the hint! That does not seem to be the nuxt way, isn't it?

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

No branches or pull requests

2 participants