#.env file location
15 messages · Page 1 of 1 (latest)
You shouldn't need the .env file. We automatically pipe your variables in.
Once you add your variable on your service, it should be available to it.
how would i use the vars in my node app? ${var_name}?
Like you would in any other node app. process.env.VAR_NAME_GOES_HERE.
ah great, so i can use it in dev mode as well as in production.
i thought i saw something like ${{varname}} somewhre in the docs
You can use it in dev mode if you're using our CLI and starting your server with railway run CMD
That's for template variables inside our dashboard.
yes, i would like to access the template vars in the dashbaord within my app.
Within your app.
.
We just pipe the variables in. Using them within your app works the same way it would irrespective of where you run your app.