Closed IlyaSemenov closed 10 months ago
Simplified in https://github.com/enkot/nuxt-open-fetch/releases/tag/v0.3.0 You can now configure client using shorter env:
NUXT_OPEN_FETCH_ACME_BASE_URL=https://api.acme.com
Updated docs: https://nuxt-open-fetch.vercel.app/setup/configuration
Currently, the documentation doesn't mention how one can configure the actual OpenAPI endpoint in runtime, such as when using dev endpoint for dev purposes and production endpoint in production. According to the documentation, one is supposed to use build-time nuxt.config.ts which is of course not a reasonable approach.
Reverse engineering the sources I ended up with:
which is then possible to override with:
So, 1) I believe this should be documented. 2) Any way to add some kind of shortcut for this purpose? This is probably the longest env variable I used in the last 10 years. :)