Setup on Raspberry Pi - brentvollebregt/monopoly-money GitHub Wiki

The following instructions are based off michaeljandrews/monopoly-money/wiki/Install-Monopoly-Money-on-a-Raspberry-Pi

Tested on the following hardware:

Raspberry Pi 4
32 Gb MicroSD card
Raspbian 10 Buster Lite (no desktop, command line only)

Run system updates

sudo apt update && sudo apt upgrade

Install tar, git

sudo apt install tar
sudo apt install git

Install NodeJs

  1. Determine system architecture (RPi4 is armv71)
    uname -m
    
  2. Go to https://nodejs.org/en/download/
  3. Copy the link for the Linux binary for the system above
  4. Download the binary
    wget <the copied link>
    
  5. Extract the files
    tar -xvf node-vXX.XX.X-linux-armvXl.tar.xz
    
  6. Go to the folder
    cd node-vXX.XX.X-linux-armvXl
    
  7. Copy everything to the system
    sudo cp -R * /usr/local/
    
  8. Check that it is working
    node -v
    npm -v
    

Build Monopoly Money

  1. clone the project into a new folder (don't use sudo for any of these commands)
    cd ~
    git clone https://github.com/brentvollebregt/monopoly-money.git
    cd monopoly-money
    
  2. Install the dependencies (do not attempt to fix missing packages or vulnerabilities)
    npm install
    
  3. Setup the client environment variables
    • 3.1. Change to the client directory
      cd /packages/client
      
    • 3.2. Create a new .env file
      sudo nano .env
      
    • 3.2. Add the following to the file, save and close:
      SERVER_ALLOWED_ORIGINS=<Insert IP address of RPi here>:5000
      

      For example: http://192.168.2.154:5000

  4. Go back to the root project folder
    cd ~
    cd monopoly-money
    
  5. Build the dependencies
    npm run build
    

Setup to run in the background

  1. Install PM2
    sudo npm install pm2 -g
    
  2. Change to the monopoly-money folder
    cd ~
    cd monopoly-money
    
  3. Start a new process
    pm2 --name MM start npm -- start
    
  4. List the running processes
    pm2 ps
    
  5. Stopping the process
    pm2 delete MM
    

Play Monopoly!

Open in web browser: http://<Insert IP address of RPi here>:5000