pigfoot/etcd


License: Apache-2.0

Language: Go


Initialization

Initialize project (github + heroku)

github (already create a project on github)

$ PROJ="etcd"
$ git clone git@github.com:pigfoot/${PROJ}.git
$ git add README.md
$ git commit -m 'Initial commit with README'
$ git push -u origin master

Create template service

$ go get -u github.com/kr/godep
$ go get -u github.com/gin-gonic/gin
$ cat << EOF > server.go
package main

import (
  "os"
  "github.com/gin-gonic/gin"
)

func main() {
    r := gin.Default()
    r.GET("/ping", func(c *gin.Context) {
      c.String(200, "pong\n")
    })

    // Listen and server on 0.0.0.0:8080
    port := "8080"
    if os.Getenv("PORT") != "" {
        port = os.Getenv("PORT")
    }
    r.Run(":"+port)
}
EOF
$ gofmt -w server.go

heroku

$ PROJ="etcd"
$ heroku apps:create -b https://github.com/kr/heroku-buildpack-go.git ${PROJ}
$ echo "github.com/pigfoot/${PROJ}" > .godir
$ echo "web: ${PROJ} -port=\$PORT" > Procfile
$ git commit -am "Set up heroku enviornment"
$ git push origin master
$ git push heroku master
$ heroku logs --tail
$ curl http://${PROJ}.herokuapp.com/ping

Project Statistics

Sourcerank 4
Repository Size 11.9 MB
Stars 0
Forks 0
Watchers 1
Open issues 0
Dependencies 16
Contributors 116
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Xiang Li Brandon Philips Yicheng Qin Blake Mizerany Jonathan Boulle Ben Johnson Brian Waldon Rob Szumski Chen, Chih-Chia Yifan Gu Fabrizio Milo Cenk Altı Alex Polvi Ed Rooth Barak Michener Cong Ding risk danger olson Hongchao Deng Jurriaan Mous Michael Marineau

Packages Referencing this Repo

github.com/pigfoot/etcd
Initialization Initialize project (github + heroku) github (already create a project on github) C...
Latest release - Published
github.com/pigfoot/etcd/worker-etcd
Latest release - Published

Something wrong with this page? Make a suggestion

Last synced: 2017-01-17 20:22:00 UTC

Login to resync this repository