The ultimate military grade random number generator.
This is main server portion of True-Random this handles incoming connections and API calls and then transmits them to the dice rolling nodes. This is also what contains the main page for the site along with styling and other resources for it.
This project already has a Dockerfile for setup and ready to use so with a few commands you can easily spin up a docker image with this server running on it.
To setup the application you required a NodeJS installation of v14.16.0 or greater (only tested on this version)
You then need to run the following command to get the required dependencies
npm install --productionThen to start the application run (you can use yarn instead of npm)
npm run start:liveor if you would like to start the application in a development environment where changes will restart the server you can run the following instead
npm run startThe following environment variables are required to run
| Variable | Example | Explanation |
|---|---|---|
| PORT | 8080 | The port in which the app will run on |
| DEBUG | false | Logs additional information about connections etc |
| SECURE_KEY | The password the websocket clients will authenticate with |
The following environment variables are optional
| Variable | Example | Explanation |
|---|---|---|
| RATE_BYPASS_KEY | A Key that can be provided to ignore rate limiting | |
| RATE_LIMIT_MINUTES | 10 | The amount of minutes before rate limiting resets |
| RATE_LIMIT_TOTAL | 1000 | The amount of requests to accept before rate limiting |