Thanks Sahil for your comments.
Environment variables, keys or credentials should not be in your source code or committed to git. You should create them in a separate .env file and add that `.env` file to your `.gitignore` file. Pull it in with process.env.KEY_NAME
Then on heroku, open the app > Settings > Config Vars. Add each key to your heroku and your app will pick it up from there.
I hope this helps .