- Install Golang
git clone
the projectgo mod tidy
to install get dependenciesgo run .
to run the project on port8081
- Install Docker
docker build . -t shounic-best-clips
to build the docker imagedocker run --rm -p 8081:8081 -v shounic-best-clips-data:/app/data shounic-best-clips
to run the containerdocker volume rm shounic-best-clips-data
to delete the database volume
/
Main page/vote/next
Get the next vote for the user returns the next vote./vote/submit?choice=
Submit a vote, returns the next vote./vote/deadline
Get the voting deadline as a unix time string
/vote/next
returns the following json for the next vote:
{
"a": string,
"b": string
}
Unique response codes:
204
- The end user has completed all their votes.420
- A predetermined deadline has passed and voting is no longer allowed.460
- The end user's vote has been rejected by the vote rate limit system.