Skip to content

okvivi/go-server-on-heroku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What's the context of this?

If you stumbled upon this repository, it's in reference to this thread about how to push a go binary to heroku https://groups.google.com/forum/#!topic/golang-nuts/6tyCz7Tc8Ow/discussion I hope it helps you on your journey!

Example of a less Go server on heroku with a proper Go workspace

$ heroku create 
$ heroku config:add BUILDPACK_URL=https://github.com/kr/heroku-buildpack-go 
$ git push heroku master

This example compiles on heroku

The directory structure has two binaries, and a foobar.com/shared shared package that both to import.

src/foobar.com/frontend/  <-- there's a binary in here, the web one
src/foobar.com/shared/    <-- NO BINARY in here, just a package with shared code
src/foobar.com/worker/    <-- there's a second binary in here

.godir must be set to base path. In this case, foobar.com

Symlinks are used to expose the frontend, shared, and worker packages to the heroku buildpack.

About

go-server-on-heroku

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages