Merge branch 'master' of github.com:devict/ictgj-voting

This commit is contained in:
Brian Buller 2018-01-23 15:07:11 -06:00
commit 82a842f7fa
2 changed files with 29 additions and 25 deletions

View File

@ -1,18 +1,17 @@
# ictgj-voting # ictgj-voting
The ICT GameJam Voting Application The ICT GameJam Voting Application
Downloading and Running ## Downloading and Running
---- 1. Download a binary from the list below that is appropriate for your system
Download a binary from the list below that is appropriate for your system 1. Run the binary, if a database is not found in the current directory, the application will walk you through an initial set up:
Run the binary, if a database is not found in the current directory, the application will walk you through 1. Create an admin user
and initial set up (create an admin user, give the site a title, name the current game jam) and a database 1. Give the site a title
will be created in the current directory 1. Name the current game jam
1. A database will be created for you in the current directory
Command Line Arguments ## Command Line Arguments
---- ### *Configuration arguments*
Configuration arguments
Passing a configuration argument will save the value to the database for future use Passing a configuration argument will save the value to the database for future use
```none ```none
-title=<title> Set the title for the site -title=<title> Set the title for the site
@ -23,7 +22,7 @@ Passing a configuration argument will save the value to the database for future
This only affects the settings that can be set from the command line This only affects the settings that can be set from the command line
``` ```
Runtime Arguments ### *Runtime Arguments*
These arguments only affect the current run of the application These arguments only affect the current run of the application
```none ```none
-help Display the application help, breakdown of arguments -help Display the application help, breakdown of arguments
@ -31,8 +30,7 @@ These arguments only affect the current run of the application
rather than the binary rather than the binary
``` ```
Prebuilt Binaries ## Prebuilt Binaries
----
[Linux 64 bit](https://br0xen.com/dowload/ictgj-voting/gjvote.linux64 "Linux 64 bit build") [Linux 64 bit](https://br0xen.com/dowload/ictgj-voting/gjvote.linux64 "Linux 64 bit build")
[Linux 32 bit](https://br0xen.com/download/ictgj-voting/gjvote.linux386 "Linux 32 bit build") [Linux 32 bit](https://br0xen.com/download/ictgj-voting/gjvote.linux386 "Linux 32 bit build")
[Linux Arm](https://br0xen.com/download/ictgj-voting/gjvote.linuxarm "Linux Arm build") [Linux Arm](https://br0xen.com/download/ictgj-voting/gjvote.linuxarm "Linux Arm build")
@ -41,26 +39,29 @@ Prebuilt Binaries
[Windows 32 bit](https://br0xen.com/download/ictgj-voting/gjvote.win386 "Windows 32 bit build") [Windows 32 bit](https://br0xen.com/download/ictgj-voting/gjvote.win386 "Windows 32 bit build")
Building ## Building
----
```none ```none
go get github.com/devict/ictgj-voting go get github.com/devict/ictgj-voting
``` ```
Developing/Contributing Notes ## Developing/Contributing
---- ### Setup
Do not make changes to `assets.go`, this file is generated when you run `go generate` 1. Fork this repo, rather than cloning directly.
Pass in the `-dev` flag to enable development mode (load assets from the file system instead of embedded). 1. Run `go get github.com/mjibson/esc`
After making changes to assets (templates, javascript, css) be sure to run `go generate` before `go build` 1. Then `go get` your github fork, similarly to the command in the Building section above.
This regenerates the assets.go file 1. Run `go generate`
1. Run `go build`
1. Make and commit your changes, then submit a Pull Request (PR) through GitHub from your fork to `github.com/devict/ictgj-voting`
Please use the go tooling to match the standard go coding style. For parts that aren't bound by that style, ### Notes
either try to match the already existing style, or give a reason why you think it should change. * 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` before `go build` - this regenerates the `assets.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 ## Vendorings
----
* 'boltdb' as a data store: https://github.com/boltdb/bolt * 'boltdb' as a data store: https://github.com/boltdb/bolt
* 'boltease' to manipulate the bolt db easier: https://github.com/br0xen/boltease * 'boltease' to manipulate the bolt db easier: https://github.com/br0xen/boltease
* Various 'gorilla' libraries for http server stuff: https://github.com/gorilla/ * Various 'gorilla' libraries for http server stuff: https://github.com/gorilla/

View File

@ -23,7 +23,10 @@ import (
"github.com/justinas/alice" "github.com/justinas/alice"
) )
// AppName Application name
const AppName = "gjvote" const AppName = "gjvote"
// DbName Database name, which is <AppName>.db
const DbName = AppName + ".db" const DbName = AppName + ".db"
// pageData is stuff that changes per request // pageData is stuff that changes per request