set the environment variable in Heroku for the HEROKU_URL code example
Example: heroku variables console
To check variables:
heroku config
To set variables:
heroku config:set VARIABLE_HERE=value
To check variables:
heroku config
To set variables:
heroku config:set VARIABLE_HERE=value