The goal of this project is to make an interactive web application for the ERAU Prescott Campus Planetarium
The application will be hosted on the cloud and will support up to 50 audience members participating in an interactive activity
git clone https://github.com/uri-planetarium/interactive-planetarium-ERAU.git
Be sure to do this in the root directory and the player_client
folder.
npm install
Setup Postgres if you haven't already. Here's a link that might be helpful for this process.
sudo apt install postgresql postgresql-contrib
Then create the database and tables. These commands can be found in database.sql
in the root folder. Be sure to create the database first then create the tables within it.
The .env
file should be placed in the root directory.
PG_USER = your_username
PG_PASSWORD = your_password
PG_HOST = localhost
PG_DATABASE = planetarium_uri_db
PG_PORT = 5432
This allows you to write code for the server and have it automatically refresh each time.
npm install -g nodemon
In the root directory...
npm start
The above can be replaced with nodemon index.js
if you installed that.
In the player_client
folder...
npm start
React's default start script automatically updates when you make changes.
First install snap
.
sudo apt install snapd
Then install and login to Heroku's CLI. Here's Heroku's initial setup page for reference.
sudo snap install --classic heroku
heroku login
heroku login
opens up a login webpage. If working in a virualbox, heroku login -i
will allow you to sign in through the terminal.
- The below is no longer necessary -
- Recent Changes have allowed pushing to the main branch to automatically deploy changes to Heroku -
heroku git:remote -a erau-interplanet-player
Syncing the pushes between this Github repository and the Heroku one allows you to push your code once and update both repositories.
git remote add both https://github.com/uri-planetarium/interactive-planetarium-ERAU.git
git remote set-url --add --push both https://github.com/uri-planetarium/interactive-planetarium-ERAU.git
git remote set-url --add --push both https://git.heroku.com/erau-interplanet-player.git
When pushing changes, git push both
will push committed changes to both repositories.
game_code
game_code
of the games they join