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.
6 Replies
Project ID:
30296f5a-7960-4804-b75a-025dd4f6760d,6d14df1a-469e-4042-a8c4-f8e148de0519
please show me how you are accessing the variables in code
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>is this a react app?
YEah
Did some research, seems like I need to prefix them with REACTAPP
Solution
yes
REACT_APP_