Skip to content
Advertisement

Tag: dotenv

Can’t access API-key from .env-file

We are having problem accessing the API-key from our .env file when trying to fetch in our server.js. If we add the API-key manually to the URL in server.js it works, so the problem seems to be the connection between server.js and .env-file. We have npm installed dotenv. In the .env file we have written the key like this: WEATHER_API_KEY

How to use Firebase Environment Variables in Nuxt Config

I am trying to separate Firebase Creds from my Nuxt Config file. But it is saying NuxtServerError Your API key is invalid, please check you have copied it correctly. It works fine when I use my creds directly into my nuxt config (without environment variables). I am using @nuxtjs/firebase module and this is my config: firebase ssr/universal auth documentation I

Advertisement