How to set environment variables on Heroku for Node app and connect to the PostgreSQL database?
<p>I know there are the same/similar questions on stack overflow and I have read the documentation too-I just still don't understand ANYTHING- how to set those variables and WHERE!! to set them.</p>
<p>My env/production.js file:</p>
<pre><code>module.exports = {
    &quot;DATABASE_URI&quot;: process.env.DATABASE_URI,
    &quot;SESSION_SECRET&quot;: process.env.SESSION_SECRET,
    &quot;TWITTER&quot;: {
       &quot;consumerKey&quot;: process.env.TWITTER_CONSUMER_KEY,
       &quot;consumerSecret&quot;: process.env.TWITTER_CONSUMER_SECRET,
       &quot;callbackUrl&quot;: process.env.TWITTER_CALLBACK
    },
    &quot;FACEBOOK&quot;: {
        &quot;clientID&quot;: process.env.FACEBOOK_APP_ID,
        &quot;clientSecret&quot;: process.env.FACEBOOK_CLIENT_SECRET,
        &quot;callbackURL&quot;: process.env.FACEBOOK_CALLBACK_URL
    },
    &quot;GOOGLE&quot;: {
        &quot;clientID&quot;: process.env.GOOGLE_CLIENT_ID,
        &quot;clientSecret&quot;: process.env.GOOGLE_CLIENT_SECRET,
        &quot;callbackURL&quot;: process.env.GOOGLE_CALLBACK_URL
    },
    &quot;LOGGING&quot;: true
};
</code></pre>
<p>In my env/development.js file I set the variables (linked to my PostgreSQL/localhost/xxx). Do I need to set them in Heroku for all (Google, Facebook etc.) or just for the database, since I had to create one with Heroku? Do I leave the link to my local database in my development file and link to the Heroku database separately?</p>
<p>I don't even know if I am supposed to do it from my command line?! In the documentation it says: Heroku config:get CONFIG-VAR-NAME -s  &gt;&gt; .env
so would it be Heroku <code>config:get CONFIG-NAME OF MY HEROKU DATABASE -s  &gt;&gt; .env</code> ?</p>
<p>I'm deploying for the first time and so confused! Help :)</p>