Skip to content

Instantly share code, notes, and snippets.

View Alvai's full-sized avatar
🦄
Learning !

Ivan Milosevic Alvai

🦄
Learning !
View GitHub Profile
@Alvai
Alvai / heroku.js
Last active December 2, 2018 20:38 — forked from Sitebase/heroku.js
Detect if node app is running on Heroku
// For Testing
const isHeroku = () => {
if (process.env.NODE && process.env.NODE.indexOf('heroku') !== -1) {
return 'This is on Heroku';
}
return 'This is not on Heroku';
};
// Not testing
const isHeroku = () => process.env.NODE && process.env.NODE.indexOf('heroku') !== -1;