weakgame-api
WEAKGAME - Is an "almost" fun game that can be used as a training platform or teaching resource for new developers. This repository is the backend REST (ish) API written in GO and generated by AUTOAPI
System requirements
- go1.4.2
- Properly setup go env
Setup
Once you have GO setup properly, proceed with setup
mkdir -p $GOPATH/src/github.com/colingagnon
cd $GOPATH/src/github.com/colingagnon
git clone https://github.com/colingagnon/weakgame-api.git
cd weakgame-api
go get github.com/gorilla/mux
go get github.com/dgrijalva/jwt-go
go get github.com/howeyc/gopass
go get github.com/ziutek/mymysql/godrv
go get is-a-dev.com/autoapi
Connect to mysql and run this as a user with grant (or change as needed)
CREATE DATABASE IF NOT EXISTS `weakgame-api`;
CREATE USER 'weakgame'@'localhost' IDENTIFIED BY 'weakpass';
GRANT ALL PRIVILEGES ON `weakgame-api` . * TO 'weakgame'@'localhost';
FLUSH PRIVILEGES;
Now import the database with the user you have just created
mysql -u weakgame -pweakpass weakgame-api < data/weakgame-api.sql
Finally run the binary for the backend
cd $GOPATH/src/github.com/colingagnon/weakgame-api
go run bin/main.go -d="weakgame-api" -u="weakgame" -h="localhost" -P="3306"
You will be asked for the password for this db user.
Usage
# Starts basic server
go run bin/main.go -d="weakgame-api" -u="weakgame" -h="localhost" -P="3306"
About this repository
This repository was originally created to be used in a "hack day" for a project management class. The students are given 1 working day to try and complete some of the additional features. At this point this is super rough, mostly intentionally, but I could see it being developed as a way to test skills for the interview process, or as a rather tool for current employees.
User Stories
Check frontend repository
Contributors
Colin Gagnon
Original source
angular-brunch-seed-no-fuss