go-flashpaper
go-flashpaper copied to clipboard
Add "Deploy to Heroku" Option
What
This adds the necessary files and reads some environmental variables, allowing go-flashpaper to run on Heroku.
Why
A one-click deploy to Heroku is useful to get a go-flashpaper instance up and running. Bonus, it comes with free TLS
Changes
Adds:
- app.json
- Procfile
- vendor/
Modifies:
- flashpaper.go
The base functionality is the same and go-flashpaper will run as before. However, using the Deploy to Heroku button creates a go-flashpaper instance on Heroku. The instance is configured through environment variables.
PORT
- this is used to set the listening port (primarily in Heroku, but can be used in stand-alone mode as well)
HEROKU
- indicates that we are running in Heroku. There are probably better ways of doing this.
Additional Info
The "Deploy to Heroku" button currently points to my fork at github.com/staaldraad/go-flashpaper. It is probably worth modifying it here to point to this repository.