Retrieve local and heroku application hostname outside a request Retrieve local and heroku application hostname outside a request heroku heroku

Retrieve local and heroku application hostname outside a request


I didn't find any way, so I created a local variable hostname based on NODE_ENV (development or production) with the proper hostname value.