many-realities-studio / realityflow-old

GNU Affero General Public License v3.0
2 stars 1 forks source link

Fix server restarting on dashboard close/refresh #8

Closed Iminance closed 3 years ago

Iminance commented 3 years ago

To test/review, follow these steps:

  1. cd into the Server folder and run npm i
  2. In the same directory, run tsc to compile the .ts server into a .js server
  3. Return to the root directory and run pm2 start ecosystem.config.js to start the server with PM2
  4. Run pm2 log 0 to view the server logs in the terminal
  5. Open a new terminal and cd into the dashboard folder
  6. Run npm i here as well
  7. Run npm start to launch the dashboard in a browser tab. The dashboard should now display "connected bus". If not, refer to the line after step 10. As of right now the dashboard works best in chrome so to open it there you can run BROWSER=chrome npm start.
  8. The terminal in which you ran pm2 log 0 should now show logs about a user logging in
  9. To close and reopen the dashboard connection repeatedly for testing, hit the refresh button on the dashboard browser tab a few times while checking the pm2 log 0 terminal for output logs
  10. If you never see the following in the log terminal, the fix was successful: image

If you encounter any errors with pm2 start, npm i, tsc, or if the dashboard does not display "connected bus" when launching it after starting the server, follow these possible fixes:

Fixes #3

Morgan-Wilkinson commented 3 years ago

Tests completed with success.