eiger
RRailway
β’Created by eiger on 6/2/2023 in #βο½help
API key not recognized on deployment, even after declaring the variable (Project type: NodeJS/React)
Hello!
It's my first time posting here. I'm trying to fetch pubmed articles for my personal website and I'm running a NodeJS/React app for that purpose. To fetch the articles, i'm using the Pubmed API and used a variable like this =>
const apiKey = process.env.YOUR_API_KEY;
.
I saved my API key in Railway as an environment variable, but I realized that it wasn't read by the CI somehow and is shown as undefined
. Using the API key locally (in the non-secure way) worked well, and my main issue is linked with the environment variable declaration...
When checking the content of process.env
, I realized there isn't any environment variable as shown here:
I might be fooled by the inspector/console log though.
Note that before using Railway, I had the exact same issue with Netlify π
Project ID: 4d7cb82a-87a2-496e-b702-70b5ed733e7d
If you have questions in order to clarify the issue, feel free to ask! I'll do my best to answer them! π
Thank you by advance π
PS: I think it's possible that's it's a duplicate of that thread. Apologies by advance .https://discord.com/channels/713503345364697088/1110912233980051508/1111059762554085497 ...13 replies