Skip to content

A drinking game built with React, TypeScript, Express and MongoDB.

Notifications You must be signed in to change notification settings

2dv609/WinnerDrinks

Repository files navigation

WinnerDrinks

Live demo of the application can be found at winner-drinks.xyz

You can also watch a short demo on Youtube.

About

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.

⚡️ Getting Started

Prerequisites

Make sure to have the following installed:

For remote deployment:

Installation

Run each command from same directory as this README-file

  1. Install NPM packages
npm ci
  1. Rename /server/.env.example to /server/.env

  2. Run start script (if permission denied -> run as root 'sudo')

./dist/start_mongodb_container_development.sh
  1. 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
  1. Open localhost on port 3000 in your web-browser and start using the application.

Deployment

Build and deploy app for production

  1. Change directory to '/dist'
cd dist
  1. 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.

Build and deploy for local production, for testing of Service Workers and IndexedDB etc

  1. Change directory to '/dist'
cd dist
  1. 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.

Notes

  • 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

Screenshots

Contributors ✨

About

A drinking game built with React, TypeScript, Express and MongoDB.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •