Environment variables
Hi
I've been using railway for one of my api services which works well locally i used go viper to manage environment variables which seems not to work in production below is the screenshot of the error
![No description](https://cdn.answeroverflow.com/1176562261809184828/image.png)
24 Replies
Project ID:
N/A
N/A
on railway you can set service variables https://docs.railway.app/develop/variables#service-variables
these variables will be injected into the environment for you, no need for the .env file.
it doesn't look like that error has caused you app to hault so you can safely ignore it
I already set the variables
the issue is that there some service that uses the variables that are not working when in production
Which means it's not working
if you set the variables in the service variables section they will automatically be injected into the container during runtime, when deployed onto railway you can ignore the missing .env file
it's not workingfrom your screenshot, i dont see any real errors, i see a fiber start mesage, so it looks fine from my perspective
Okay
Seems it's now working
awesome!
Thanks man
no prob!
the error is still there
![No description](https://cdn.answeroverflow.com/1176949586879848599/image.png)
a panic would be an issue with your code
No
Everything works fine on my local machine
that does not rule out a code issue
I don't think so
railway isn't telling your code to panic, that's your code panicking, railway runs your code as is