Small server.ts fixes for JSON stringification
Update types/node dependency to fix tsc error
Add database/prod.db to .gitignore
Instructions for launching/testing the dashboard:
Open a bash terminal in the root realityflow_2 directory.
cd into the Server folder.
Run npm i to install the dashboard dependencies.
Run tsc to compile the server.ts file into a .js file.
If attempting to run tsc does not work, make sure typescript is installed globally. If not, run npm install -g typescript
cd .. back out into root directory.
cd into the dashboard folder.
Run npm i to install the dashboard dependencies.
If you have a node_modules folder in the root directory, delete it.
cd .. back out into root directory.
To run the server, first check if any pm2 instances are already running with pm2 status. If so, use pm2 delete <id> to delete the process.
If attempting step 10 caused an output of pm2 command not found, install pm2 globally by running npm i -g pm2 and try again.
Run pm2 start ecosystem.config.js and then run pm2 log 0. If successful, you should see something like the following in your terminal:
cd into the dashboard folder again and run npm start to start one instance of the dashboard. You should now see the following in the browser:
Open a new terminal and cd into the dashboard folder again. Run npm start again to start a second instance of the dashboard for testing purposes. The terminal will ask you to run it on another port since the first dashboard is already running. Type Y and hit enter to start the second dashboard app. You should now see this output on the first dashboard browser tab:
If you see the above image in your browser for the first instance of the dashboard, the dashboard is properly tailing the server's logs.
Small server.ts fixes for JSON stringification Update types/node dependency to fix
tsc
error Add database/prod.db to .gitignoreInstructions for launching/testing the dashboard:
cd
into the Server folder.npm i
to install the dashboard dependencies.npm install -g typescript
cd ..
back out into root directory.cd
into the dashboard folder.npm i
to install the dashboard dependencies.cd ..
back out into root directory.pm2 status
. If so, usepm2 delete <id>
to delete the process.pm2 command not found
, install pm2 globally by runningnpm i -g pm2
and try again.pm2 start ecosystem.config.js
and then runpm2 log 0
. If successful, you should see something like the following in your terminal:cd
into the dashboard folder again and runnpm start
to start one instance of the dashboard. You should now see the following in the browser:cd
into the dashboard folder again. Runnpm start
again to start a second instance of the dashboard for testing purposes. The terminal will ask you to run it on another port since the first dashboard is already running. Type Y and hit enter to start the second dashboard app. You should now see this output on the first dashboard browser tab: If you see the above image in your browser for the first instance of the dashboard, the dashboard is properly tailing the server's logs.