gonawin

module
v0.1.31-0...-b1e5c7a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2018 License: ISC

README

gonawin

A social web application to make "friendly bets" on sport games with your friends.

We believe that todays betting platforms are full of adds that polute the game itself. We want to create a platform that people can use to bet/play with there friends and family or anyone they want without anything in between. There is no money involved.

Contributors

Third Parties Installation

go get github.com/garyburd/go-oauth/oauth

Third Parties

Installation

  • install go
  • set up your environement
  • install the go appengine sdk
  • set up the appengine environement
  • go get github.com/garyburd/go-oauth/oauth
  • go get github.com/taironas/gonawin
  • go get github.com/taironas/route
  • cd $GOPATH/src/github.com/taironas/gonawin/gonawin
  • cp example-config.json config.json
  • add your email to the config.json in the admins section
  • goapp serve

Run App

cd $GOPATH/src/github.com/taironas/gonawin/gonawin
dev_appserver.py app.yaml

Test App

goapp test ./...

test models (in ./models):

> goapp test -v -run=^*Team$
> goapp test -v -run=^*User$

Run App with production datastore backup

Create datastore backup

> go_appengine\appcfg.py download_data --url=http://www.gonawin.com/_ah/remote_api --filename=bck_gonawin_mmddyyyy

Run local server

> cd $GOPATH/src/github.com/taironas/gonawin/gonawin
> goapp serve

Connect datastore backup to the local server

> go_appengine\appcfg.py upload_data --url=http://localhost:8080/_ah/remote_api --filename=bck_gonawin_mmddyyyy

Run App with clean data store

> cd $GOPATH/src/github.com/taironas/gonawin/gonawin
> dev_appserver.py --clear_datastore=yes .

Access app from smartphone

Get your ip in this case 192.168.1.X

> ifconfig
...
inet 192.168.1.X netmask 0xffffff00 broadcast 192.168.1.255
...

Run the app with the -host parameter

> goapp serve -host=0.0.0.0
INFO     2014-04-26 10:25:33,296 devappserver2.py:764] Skipping SDK update check.
WARNING  2014-04-26 10:25:33,299 api_server.py:374] Could not initialize images API; you are likely missing the Python "PIL" module.
INFO     2014-04-26 10:25:33,302 api_server.py:171] Starting API server at: http://localhost:53542
INFO     2014-04-26 10:25:33,305 dispatcher.py:182] Starting module "default" running at: http://0.0.0.0:8080
INFO     2014-04-26 10:25:33,307 admin_server.py:117] Starting admin server at: http://localhost:8000

access from your smartphone on http://192.168.1.X:8080/ng

Formatting

go fmt ..\gonawin\...
Deployment
> pwd
    taironas/gonawin/gonawin
gcloud config list
gcloud config set project projectname
gcloud app deploy ./app.yaml

Note: If deployment hangs rollback it by doing:

On OSX
appcfg rollback ..
On Windows
python appcfg.py rollback $GOPATH\src\github.com\taironas\gonawin\gonawin

Documentation

godoc -http=:6060

Directories

Path Synopsis
Package config provides a way to configure gonawin app.
Package config provides a way to configure gonawin app.
controllers
activities
Package activities provides the JSON handlers to get gonawin activities.
Package activities provides the JSON handlers to get gonawin activities.
invite
Package invite provides the JSON handlers to send invitations to gonawin app.
Package invite provides the JSON handlers to send invitations to gonawin app.
sessions
Package sessions provides the JSON handlers to handle connections to gonawin app.
Package sessions provides the JSON handlers to handle connections to gonawin app.
tasks
Package tasks provides a set of handlers to perform long running tasks in gonawin app.
Package tasks provides a set of handlers to perform long running tasks in gonawin app.
teams
Package teams provides the JSON handlers to handle teams data in gonawin app.
Package teams provides the JSON handlers to handle teams data in gonawin app.
tournaments
Package tournaments provides the JSON handlers to handle tournaments data in gonawin app.
Package tournaments provides the JSON handlers to handle tournaments data in gonawin app.
users
Package users provides the JSON handlers to handle users data in gonawin app.
Package users provides the JSON handlers to handle users data in gonawin app.
Package gonawin provides starts a the gonawin web application.
Package gonawin provides starts a the gonawin web application.
Package helpers provides a set of utility functions used across gonawin app.
Package helpers provides a set of utility functions used across gonawin app.
auth
Package auth provides the functions needed to get a user information.
Package auth provides the functions needed to get a user information.
handlers
Package handlers provides a set of functions to manipulate http.HandlerFunc at a route level.
Package handlers provides a set of functions to manipulate http.HandlerFunc at a route level.
log
Package log provide a set of function to log in gonawin app.
Package log provide a set of function to log in gonawin app.
memcache
Package memcache provides a set of functions to use memcache in gonawin.
Package memcache provides a set of functions to use memcache in gonawin.
templates
Package templates provides a set of functions to encode data in a http.ResponseWriter.
Package templates provides a set of functions to encode data in a http.ResponseWriter.
Package models provides the entities used in gonawin app.
Package models provides the entities used in gonawin app.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL