Skip to content

RightOn Host: Link Networking

Zach Thomas edited this page Dec 22, 2022 · 6 revisions

Connect Networking to Host

  1. Checkout the dev branch and run git pull
  2. In Networking src folder add the aws-exports.js file sent out via slack.
  3. cd into the networking folder
  4. run npm install -g (mac users might need to run sudo npm install -g) You may see some peer dependency conflicts - in that case run sudo npm install -g --force
  5. run npm install
  6. run npm run build
  7. then npm link
  8. cd out of the networking folder then cd into the web folder
  9. run npm link @righton/networking (if you are facing some dependency issues, try running npm link @righton/networking --legacy-peer-deps)
  10. then npm install (if you are facing some dependency issues, try running npm link @righton/networking --legacy-peer-deps)
  11. run npm start and update your URL to http://localhost:3000/host/gameSessionId to launch the Start Game page, with gameSessionId being the URL extension past /host/ in host.rightoneducation.com/host/gameSessionId when a game is launched from central.rightoneducation.com.

** Note: it can take a few times refreshing the page for it to actually connect and hit the API endpoint. Usually you'll get an internal server error the first handful of times trying to connect to the Lambda, but it will go through.

Connect Networking to Debug Panel

  1. cd into the networking folder
  2. run npm install -g (mac users might need to run sudo npm install -g)
  3. run npm install
  4. run npm run build
  5. then npm link
  6. cd out of the networking folder then cd into the debug-panel folder
  7. run npm link @righton/networking
  8. then npm install
  9. npm start 🤞

** One thing to note is that it can take a few times of clicking the Create Game Session button for it to actually connect. Usually you'll get an internal server error the first handful of times trying to connect to the Lambda, but it will go through. (Helpful to inspect and watch the console here)

Once it does connect and hit the endpoint - you should see the game session ID returned in the browser.