I have my NASA API Key in a .env file, which worked fine running my app on localhost. How that it’s deployed to fly.io, I’m calling the API from client side, it’s going through to the server, but I am getting this error:
{
“latest_photos”: {
“error”: {
“code”: “API_KEY_INVALID”,
“message”: “An invalid api_key was supplied. Get one at https://api.nasa.gov:443”
}
}
}
I am surmising from other threads and from the error message, that the application is unable to read the API key from the .env file the way it did on localhost. Any suggestions would be appreciated. I am very close to having my app working.