This is a simple HTTP redirect service which can be run as a stand-alone service. It can be optionally run on Heroku which is the initial use case.
Heroku provides easy hosting with default hostnames at https://{projectName}.herokuapp.com. This project provides an easy way to deploy a project to Heroku to redirect traffice to another URL.
No code modifications are necessary. URL and HTTP status are both set via environment variables.
Set the following Environment Variables:
REDIRECT_URL
: URL where the requestor should be redirected.HTTP_STATUS
: the HTTP status code to use. 302
is used by default.PORT
: port number which the service should run on, e.g. 8080
. Note: Heroku will automatically set this environment variable.$ heroku create
$ git push heroku master
$ heroku open
or
Heroku support provided via github.com/grokify/goheroku
.