Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the other heroku environment variables?

When setting up a server, I noticed that the environment variable process.env.PORT is used. Are there any other variables like this? Where can I see all of them?

like image 970
neuromancer Avatar asked Apr 17 '12 05:04

neuromancer


People also ask

Where are Heroku environment variables?

Accessing config var values from code js you can access your app's DATABASE_URL config var with process. env. DATABASE_URL .

How does Heroku define environment variable?

One way of setting the environment variables on Heroku is to use the web interface. The first step is to log into your account and go to the Heroku dashboard. Figure 1 illustrates my dashboard. Choose the application for which you want to set the environment variables.

Does .ENV work in Heroku?

env file on Heroku isn't a good approach. Instead, you can use its built-in support for environment variables, using heroku config:set <var> <value> or its web UI. Either way, you'll get a regular environment variable. But for testing these config vars in local, we need to set up a .

Are Heroku environment variables secure?

IMO both – environment variables and config files – are secure as long you can trust everyone that has access to your servers and you carefully reviewed the source code of all libraries and gems you have bundled with your app.


1 Answers

The following command will display all of the environment variables, not just those visible from heroku config:

heroku run printenv 
like image 119
Potherca Avatar answered Sep 30 '22 23:09

Potherca