diff --git a/nuxt.config.ts b/nuxt.config.ts index b1ec1013a..0247576dd 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -24,4 +24,7 @@ export default defineNuxtConfig({ 'postcss-nested': {}, }, }, + runtimeConfig: { + registedAppsUrl: process.env.APPS_JSON_URL || 'http://localhost:3000/registered-apps.json', + }, }) diff --git a/server/shared.ts b/server/shared.ts index b848cbb1a..74f5404aa 100644 --- a/server/shared.ts +++ b/server/shared.ts @@ -3,7 +3,8 @@ import type { AppInfo } from '~/types' export const registeredApps: Record = {} -const promise = $fetch(process.env.APPS_JSON_URL || 'http://localhost:3000/registered-apps.json') +const runtimeConfig = useRuntimeConfig() +const promise = $fetch(runtimeConfig.registedAppsUrl) .then(r => Object.assign(registeredApps, r)) .catch((e) => { if (process.dev)