heroku ❤ gophers

Deploying Golang API to Heroku

This is continuation of the intersect project from

But feel free to easily use this to deploy your code.

To deploy it on Heroku.

I’ll assume you have Heroku cli installed and logged in.
or you can start here.
Install heroku cli

  • Create a Procfile that points to our binary with one line and place it in the root of the directory
// Profile
web: bin/Intersect_api
  • Run the app locally to test using
heroku local
  • Create a Heroku app
heroku create intersect-api-v2
  • Then commit our changes on git
git add .
git commit -m '💪'
  • And at the end, simply deploy our app using
git push heroku heroku-deploy:master
  • (Optional) Subsequent change can be commit using
git push heroku master

Extra

  • You can read the logs from with
heroku logs

That’s about it.
Now we can check our server at https://intersect-api-v2.herokuapp.com

This project is hosted at:

Find me at:

--

--

--

onw to 10x developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

9 tips on how to get tech support and development work as a team

One company's lousy engineer is another company's good architect.

Rapid AWS API dev on your laptop with Localstack, Pulumi, PostgreSQL, and Docker

How to build an Alexa Skill to add Objects to your Cosmic JS Bucket via Voice

Using Airtable to Manage Conference Submissions

Logstash: How To Install A Plugin- The Simplest Ways.

Ubuntu Touch Q&A 59 | New contributors appearing regularly

It’s as Easy as Pie!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Navin Kodag

Navin Kodag

onw to 10x developer

More from Medium

Build a REST API with Golang and MongoDB — Fiber Version

GoFrame 101: Static file handler with Web UI

404 while using dynamic/wildcard route in GIN (GOLANG) — Solved

Asgardeo authentication with Golang and Goth