assets | ||
Godeps | ||
templates | ||
vendor | ||
.gitignore | ||
admin_archive.go | ||
admin_clients.go | ||
admin_endpoints.go | ||
admin_games.go | ||
admin_teams.go | ||
admin_users.go | ||
admin_votes.go | ||
assets.go | ||
main.go | ||
model_clients.go | ||
model_gamejam.go | ||
model_games.go | ||
model_sitedata.go | ||
model_teams.go | ||
model_users.go | ||
model_votes.go | ||
model.go | ||
page_session.go | ||
public_endpoints.go | ||
README_ADMIN_USAGE.md | ||
README_GOTIME.md | ||
README.md |
ictgj-voting
The ICT GameJam Voting Application
Downloading and Running
- Download a binary from the list below that is appropriate for your system
- Run the binary, if a database is not found in the current directory, the application will walk you through an initial set up:
- Create an admin user
- Give the site a title
- Name the current game jam
- A database will be created for you in the current directory
Command Line Arguments
Configuration arguments
Passing a configuration argument will save the value to the database for future use
-title=<title> Set the title for the site
-port=<port> The port to run the site on
-session-name=<name> A name to use for the session
-server-dir=<director> Directory to use for assets (templates/js/css)
-reset-defaults Reset all of the configurable site settings to their defaults
This only affects the settings that can be set from the command line
Runtime Arguments
These arguments only affect the current run of the application
-help Display the application help, breakdown of arguments
-dev Run in development mode, load assets (templates/js/css) from file system
rather than the binary
Prebuilt Binaries
Linux 64 bit
Linux 32 bit
Linux Arm
Mac OS
Windows 64 bit
Windows 32 bit
Building
go get github.com/devict/ictgj-voting
Developing/Contributing
Setup
- Fork this repo, rather than cloning directly.
- Then
go get
your github fork, similarly to the command in the Building section above. - Make your changes
- If you changed any template files, run
go generate
to regenerate theassets.go
file - Make and commit your changes, then submit a Pull Request (PR) through GitHub from your fork to
github.com/devict/ictgj-voting
Notes
- Pass in the
-dev
flag to enable development mode (load assets from the file system instead of embedded). - After making changes to assets (templates, javascript, css) be sure to run
go generate
beforego build
- this regenerates theassets.go
file - Please use the go tooling to match the standard go coding style.
- For parts that aren't bound by standard go style, either try to match the already existing style, or give a reason why you think it should change.
Vendorings
- 'boltdb' as a data store: https://github.com/boltdb/bolt
- 'boltease' to manipulate the bolt db easier: https://github.com/br0xen/boltease
- Various 'gorilla' libraries for http server stuff: https://github.com/gorilla/
- context: https://github.com/gorilla/context
- handlers: https://github.com/gorilla/handlers
- mux: https://github.com/gorilla/mux
- securecookie: https://github.com/gorilla/securecookie
- sessions: https://github.com/gorilla/sessions
- 'alice' for http server middleware: https://github.com/justinas/alice
- 'uuid' for uuid generation: https://github.com/pborman/uuid
- 'esc' for embedding assets: https://github.com/mjibson/esc