Simple Go/Gin REST service for storing and retrieving quotes
This repository goes along with the blog post Deploying a Simple Go/Gin Appliction on Heroku.
On macOS you can use Homebrew, on other systems you can download the installer from the official Go website.
brew install go
go mod initi gihub.com/YOUR-USERNAME/YOUR-REPO-NAME
go get github.com/gin-gonic/gin
go run main.go
heroku login
heroku apps:create my-go-gin-api
git remote show heroku
go mod tidy
Assuming you're in the project directory, git add .
works great. Otherwise you might need git add -All
.
git add .
git commit -m "Prepare app for Heroku deployment"
git push heroku main
curl -s -X GET https://<<APP-URL>>/quote | jq