Now poll.horse is available as a docker image!
To persist data, mount `/data` to a host directory.
A config file can be specified via binding `/usr/src/app/config.json` to
a config file on the host.
A slight update to the icon has been done by dotkwa.
The checkmark is a darker, more powerful green to stand out a bit
more in front of the bright background.
`<meta>` tags have been added to relay information for websites trying
to pull information from the page (like discord) as well as web crawlers
to index the page.
This way, people can easily just use their QR readers to reach the
voting page. The QR is constructed via Google Charts API and the URL is
based on the HOST header of the request.
The API has been moved to a /api path to distinguish it from the form
submission path and make it clear it is a callable API.
The API also has been rudimentarily documented.
Duplicate entries were deduplicated during saving but not checked for
when verifying for at least 2 options set. This lead to being able to
have polls with only a single vote.
Now deduplication is run at the start of the creation function.
The options only appeared when at least 2 letters were typed into the
input field as the event triggered before a value was set into the input
field. Using `keyup` instead of `keydown` delays the event after a
letter has been typed into it.
When a heroku dyno goes into sleep mode it loses connection to the
backend database. Once it is woken back up, no more reads or
writes could be done anymore due to a dead connection. This change
reinstates a new db connection when the connection is fatally
terminated.
Including to the previous flatfile storage, a new storage for MySQL has
been added to store polls in a database.
The amount of possible Poll Options has also been reduced to 20.
This page displays all options that have been set on creation. Thanks to
`textFit` the texts in the title and options automatically get sized
correctly. The create poll button has also been renamed to submit-button
to make it more universal on other pages.