A basic snakehack starter kit written in go.
-
Clone repo to your development environment:
git clone git@github.com:USERNAME/snakehack-go.git $GOPATH/github.com/USERNAME/snakehack-go
cd $GOPATH/github.com/USERNAME/snakehack-go
- Compile the snakehack-go server.
go build
This will create a snakehack-go
executable.
-
Modify your configuration file
-
Run the server.
./snakehack-go
- Test the client in your browser: http://127.0.0.1:4242
download heroku cli https://devcenter.heroku.com/articles/getting-started-with-go#set-up
login to heroku
heroku login
create new heroku app, --region eu
is important for fast enough response times
heroku create [APP_NAME] --region eu
push to heroku
git push heroku master
delete heroku git
git remote rm heroku
govendor is used for dependency management
- install or update govendor
go get -u github.com/kardianos/govendor
- add to project
govendor init
This creates a vendor/
directory and a vendor.json
file in that directory.
- adding dependencies
govendor fetch <package>
- list status
govendor list