Skip to content

tonyta/pandago

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PandaGo 🐼

Panda! Go, Panda!

Pandoc, wrapped in Go.

Cloning this Project

It's better to use go get instead of git clone so that your repo ends up somewhere in the $GOPATH (which is relied on by govendor).

go get github.com/scripted/pandago
cd $GOPATH/src/github.com/scripted/pandago

PandaGo Locally

You can run the server directly.

go run main.go

Compile and Run a la Heroku

go install -v ./...
heroku local

Instead of running pandago, you can also run the app directly using pandago.

curl -i localhost:8080
#
# HTTP/1.1 200 OK
# Content-Type: application/json; charset=utf-8
# Date: Tue, 11 Oct 2016 21:53:14 GMT
# Content-Length: 19
#
# {"message":"OK 🐼, Go!"}

Dependencies with govendor

PandaGo uses govendor to manage its dependencies.

go get -u github.com/kardianos/govendor

You can install all dependencies described in vendor/vendor.json into the vendor/ directory by running the following.

govendor sync

To update dependencies as described in the app, run the following.

govendor add +external
govendor remove +unused

For more info, checkout out Heroku's page on govendor.

Deploying to Heroku

Create the Heroku app as usual:

heroku create

Add the official heroku/go buildpack as well as the a buildpack for installing custom binaries so we can install Pandoc via .custom_binaries:

heroku buildpacks:add heroku/go
heroku buildpacks:add https://github.com/tonyta/heroku-buildpack-custom-binaries#v1.0.0

That's it. Then just push it to Heroku like normal.

git push heroku master
curl -i https://<YOUR_APP_NAME>.herokuapp.com
#
# HTTP/1.1 200 OK
# Server: Cowboy
# Connection: keep-alive
# Content-Type: application/json; charset=utf-8
# Date: Tue, 11 Oct 2016 21:51:06 GMT
# Content-Length: 19
# Via: 1.1 vegur
#
# {"message":"OK 🐼, Go!"}

About

Go, Pandoc... Go! Go! Go!

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 65.3%
  • HTML 34.7%