CLI app to create boilerplate for a Heroku Go app. These files will also enable the "Deploy to Heroku" button to function.
$ go get github.com/grokify/goheroku
$ goheroku my-project
Writing file 1: my-project/.env
Writing file 2: my-project/app.json
Writing file 3: my-project/Dockerfile
Writing file 4: my-project/heroku.yml
Writing file 5: my-project/Makefile
Writing file 6: my-project/Procfile
DONE
You will need to use go mod init
to create your go.mod
file. Add the following Heroku directive to your go.mod
file above the go version number line.
// +heroku goVersion go1.16
go 1.16
Once your repo is ready for Heroku, you can add various options to "Deploy to Heroku" to your README.md
file. The following includes adding a shield, button, and a CLI manual mode.
The following adds a shield that looks like to your file.
[![Heroku][heroku-svg]][heroku-url]
[heroku-svg]: https://img.shields.io/badge/%E2%86%91_deploy-Heroku-7056bf.svg?style=flat
[heroku-url]: https://heroku.com/deploy
The following adds a button that looks like to your file.
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
$ heroku create
$ git push heroku master
$ heroku open
Find information on deploying Go apps on Heroku here:
- Developer Guide: https://devcenter.heroku.com/articles/go-support
- Example Project: https://github.com/heroku/go-getting-started
=====