ab520c325f
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3.1.0...v3.1.1) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
.github | ||
.vscode | ||
frontend | ||
src | ||
test | ||
utils | ||
.dockerignore | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc.json | ||
.gitignore | ||
.mocharc.json | ||
API.md | ||
CHANGELOG.md | ||
Dockerfile | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
Procfile | ||
README.md | ||
tsconfig.json |
Poll.horse
Simple polling service for public polls
With strawpoll being somewhat very broken I decided to implement my own. Let's go!
What is this
If you have never used strawpoll, in short this is a website to easily make small polls without a fuss.
A live version is available here. This version is always based on the current master
branch and release tags.
You want more cutting edge? Under dev.poll.horse you can find the most recent builds based on the current commit of the dev
branch. New features can be tested here but the integrity of the database is not guaranteed and may be occasionally wiped.
API
This service offers an API to create and get the status of polls. The API Docs can be found here.
Running your own instance of Poll.Horse
Standalone
- Make sure you have Node installed.
- Download the latest release zip from the releases page;
- Extract the zip file anywhere
- Open a shell in in the directory you just extracted to and run
npm i --production --ignore-scripts
- Start the server with
npm start
- List all available options with
npm start -- --help
or use shell options withnpm start -- <options>
Docker
- Install Docker
- Download/clone the contents of this repository
- Open a shell in the directory and run
docker build -t poll.horse
- Use
docker run poll.horse
- Optionally mount config file at
/usr/src/app/config.json
- Optionally mount persistent directory to
/data
Contributing
The core is written in TypeScript, a typed superset to Javascript and executed with NodeJS. Pull Requests welcome.
Before cloning this repository, make sure you have Node installed.
Then clone this repository, open a terminal/command prompt and type npm i
to install the required dependencies.
ts-node
is recommended to test during development manually, install it with npm i -g ts-node typescript
.
Directory Structure
./dist
- The finalized and compiled files that can be used with node./src
- The source files of the project./test
- Files required for unit testing, aka test setup/teardown and test spec files./utils
- Various utility scripts not part of the main source code
Scripts
Execute the scripts with npm run <script>
find-todo
- Finds remainingTODO:
in the code and warns the developer that there are still things that are unfinishedmocha
- Runs the unit tests in the/test
directorylint
- Runseslint
and checks for code styling problemsbuild
- Compile the TypeScript Source todist/
test
- Runslint
,find-todo
andmocha
in orderdebug
- Start the./src/main.ts
with node and start the debugger on port 9229. Files will be watched for changes.start
- Runtest
andbuild
, then try and execute the./dist/main.js
in the./dist
directory to test
Components
This project makes use of the following components. Thanks a lot to the respective creators: