env not in useRuntimeCOnfig
NUXT_POSTGRES_DB=syncdemo
this is in my env but my runtimeCOnfig composable only shows
{
app: { baseURL: '/', buildAssetsDir: '/nuxt/', cdnURL: '' },
nitro: {
envPrefix: 'NUXT',
routeRules: {
'/__nuxt_error': [Object],
'/_nuxt/builds/meta/': [Object],
'/_nuxt/builds/': [Object]
}
},
public: {}
}
i use it inside server/utils/xx.ts
in devmode
4 Replies
Did you explicitly add to runtimeConfig in the nuxt.config.ts? https://nuxt.com/docs/api/composables/use-runtime-config
Nuxt
useRuntimeConfig Β· Nuxt Composables
Access runtime config variables with the useRuntimeConfig composable.
no
do i need to do this?
Yes
ok thanks