Clone the repo:
$ git clone https://github.com/irfanbaigse/sample-rest-api-go
Compile and install the code with:
$ go install
In the project directory, run the application:
$ PORT=8191 ./bin/rest-api
Make a HTTP request to the application:
Create a Heroku account here
$ brew install heroku
$ heroku login
$ heroku create -b https://github.com/kr/heroku-buildpack-go.git sample-rest-api-go
now goto https://sample-rest-api-go.herokuapp.com
By default, your app is deployed on a free dyno. Free dynos will sleep after a half hour of inactivity. To avoid that run below command and make sure your account is verified.
$ heroku ps:scale web=1