Skip to content

stair-ch/snakehack-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

00d19b3 · Nov 11, 2017

History

24 Commits
Oct 31, 2017
Oct 31, 2017
Nov 11, 2017
Oct 31, 2017
Oct 31, 2017
Oct 31, 2017
Oct 31, 2017
Oct 31, 2017
Oct 31, 2017
Oct 31, 2017
Nov 11, 2017
Oct 31, 2017
Oct 31, 2017
Oct 31, 2017

Repository files navigation

snakehack-go

A basic snakehack starter kit written in go.

How to start

  1. Fork this repo.

  2. 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
  1. Compile the snakehack-go server.
go build

This will create a snakehack-go executable.

  1. Modify your configuration file

  2. Run the server.

./snakehack-go
  1. Test the client in your browser: http://127.0.0.1:4242

Heroku

Deploy

Heroku-cli commands

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

  1. install or update govendor
go get -u github.com/kardianos/govendor
  1. add to project
govendor init

This creates a vendor/ directory and a vendor.json file in that directory.

  1. adding dependencies
govendor fetch <package>
  1. list status
govendor list