Railway not passing in env variables

Hi, I have a railway project https://railway.app/project/30296f5a-7960-4804-b75a-025dd4f6760d/service/6d14df1a-469e-4042-a8c4-f8e148de0519 I'm using the default Nix pack to build it, but it doesn't seem like the env variables that are defined in the variables tab are being passed into the program. Is there something that I need to do?
Railway
404 - Page not found
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
Solution:
yes REACT_APP_
Jump to solution
6 Replies
Percy
Percy7mo ago
Project ID: 30296f5a-7960-4804-b75a-025dd4f6760d,6d14df1a-469e-4042-a8c4-f8e148de0519
Brody
Brody7mo ago
please show me how you are accessing the variables in code
ari.pickar
ari.pickar7mo ago
const baseURL = process.env.NODE_ENV === 'development' ? 'http://localhost:8000' : process.env.API_LOCATION; And <div> <h2>Login</h2> {error && <p>{error}</p>} <h2>Home Page</h2> <h4>{Running in ${process.env.STAGE}}</h4> </div>
Brody
Brody7mo ago
is this a react app?
ari.pickar
ari.pickar7mo ago
YEah Did some research, seems like I need to prefix them with REACTAPP
Solution
Brody
Brody7mo ago
yes REACT_APP_
Want results from more Discord servers?
Add your server