- Open terminal on computer
- [Terminal] Navigate into the directory where you would like to clone the repository using
cd
- After entering the directory, run the following code in the terminal to clone the repository:
git clone https://gitlab.cci.drexel.edu/mkq25/doodleio.git
- [Terminal] Install PostgreSQL if it is not already on your device
- [Terminal] To run PostgreSQL, run the following command in the terminal:
psql --username postgres
- [Postgres] After entering PostgreSQL, run this command in order to create the database:
CREATE DATABASE doodleio;
- [Postgres] Run this command in order to connect to the database:
\c doodleio;
If this is successful, the terminal should return the following messsage:You are now connected to database "doodleio" as user "postgres".
- [Postgres] To set up the required tables and entries, run the command
\i /path/to/database/db_setup.sql;
. NOTE: do not include the "C:" part of the path and make sure that the slashes between directories are "/" - [Postgres] Type "quit" (without quotations) to exit PostgreSQL.
- [Terminal] Navigate into the /app folder using
cd
- [Terminal] Run the command
npm install
to install the necessary node modules.
- Open the env.json file using a text editor.
- Edit the password attribute ("password": "") and type in your own password inside the quotation marks to allow access to your PostgreSQL login.
- If needed, also change the port attribute ("port": ) to the deault port your PostgreSQL uses.
- [Terminal] Make sure you are still located in the /app folder before running the server.
- [Terminal] Run the following command to start the server:
node server.js
- In any browser, go to localhost:3000 to access the homepage of the website.
- If you want to open the program on multiple browser windows, you can use incognito mode since cookies keeps users signed in.
For our demonstration, we were able to access and play on our website with multiple devices.
This was done with the tool "ngrok", which can be found at this link: https://ngrok.com/. We used the free plan they offer for testing and development. When running this program, a client can broadcast a specific port on their computer and retrieve a URL for others to connect to.
For our case, in the program, we ran ngrok.exe http 3000
to broadcast localhost:3000 on one laptop to everyone else's. A URL was randomly generated (in the video it was: https://bf07-144-118-77-61.ngrok.io/, which will not work anymore) and other laptops could access the program running simultaneously.
Note: This is not required to test the program locally -- the same functionality can be seen with multiple tabs (see step 18) on the same device.