Live demo of the application can be found at winner-drinks.xyz
You can also watch a short demo on Youtube.
This is the complete repository for the WinnerDrinks application.
You'll find the client side code built using React/TypeScript in the directory client and the server side code in the directory server.
Make sure to have the following installed:
-
Node.js (version <= 14.15.4)
-
🐳 Docker (version <= 20.10.3)
-
Docker-compose (version <= 14.15.4)
Run each command from same directory as this README-file
- Install NPM packages
npm ci
-
Rename /server/.env.example to /server/.env
-
Run start script (if permission denied -> run as root 'sudo')
./dist/start_mongodb_container_development.sh
- Start the application locally
- Alt 1 - Start and initialize data
npm run start:dev:init
- Alt 2 - Start without initialize data (Command is dependent on Alt 1, please run Alt at least 1 time first!)
npm run start:dev
- Open localhost on port 3000 in your web-browser and start using the application.
- Change directory to '/dist'
cd dist
- Run deployment script (if permission denied -> run as root 'sudo')
./deploy_app_remote.sh <path_to_ssh_key> <public_ip_addres_machine_1> <public_ip_addres_machine_2> <public_ip_addres_machine_3>
Open winner-drinks.xyz (OBS! Can take some minute).
🔔 Please note: Application is cached and you may have to:
- Unregister Service Worker
- Delete cached storage
- Delete indexedDB
- Reload the page to get the latest update visible.
- Change directory to '/dist'
cd dist
- Run local deployment script (if permission denied -> run as root 'sudo')
./deploy_app_local.sh
Open localhost:4000 on your computer, obs can take some minute.
- The animation for the Spin-the-wheel game doesn't work on Safari due to their web-engine (WebKit).
- Starting the software locally, deploy for local production and deploy for release works without any problem on Ubuntu > 18.04