ecumeurs / upsilon_cities_go

MIT License
1 stars 0 forks source link

Upsilon Cities Go

dependencies

# go get github.com/gorilla/mux github.com/gorilla/context github.com/gorilla/sessions github.com/lib/pq github.com/felixge/httpsnoop github.com/oxtoacart/bpool github.com/antonlindstrom/pgstore golang.org/x/crypto/bcrypt github.com/cosmtrek/air

infos

https://semaphoreci.com/community/tutorials/building-and-testing-a-rest-api-in-go-with-gorilla-mux-and-postgresql

seem to cover it

project layout

\ config 
\ db
   \ schema.sql
   \ migrations \    # all migrations from 0 to now ;)
\ lib
   \ db \            # DB accessor / Models
   \ cities \        # Cities mechanics
\ web
   \ controllers \   # API/Websever controller 
   \ shared \        # Shared templates (accros all controllers)
   \ layout \        # Main layout ( and specialized layout )
   \ templates \     # Views by controller
   \ static \        # CSS/JS/IMG files
   \ tools \         # Cross purpose functions
   \ router.go       # Router
\ data
   \ names           # name generator seed
   \ producers       # producer generator seed
   \ resources       # resources generator seed
\ install            # install & execution scripts

Config

Don't forget to generate your own system.json and gameplay.json ! You'll need to create your databases too.

Launch

Windows : air -c .air_windows.toml Linux : air -c .air.toml