Stores past data from RPI's Student Government using JavaScript, Node.js, and PostgreSql.
- Clone the repository and make note of the repo's location.
- If it is not installed already, install Node.js onto your machine.
- This can be accomplished by running
sudo apt-get install nodejs
- Ensure the installation was successful by checking the version by running
node -v
ornode -version
.
- This can be accomplished by running
- If it is not installed already, continue by installing npm onto your machine as well
- This can be done by running
sudo apt-get install npm
- Check that npm is installed by checking the version using
npm -v
ornpm --version
.
- This can be done by running
- Navigate into the project directory, and run
npm install
to install all the necessary modules for sg_data to properly run. - Continue by installing Postgres(https://www.postgresql.org) onto your system.
- Install by running
sudo apt-get install postgresql
- Set the password for default user
postgres
by runningsudo passwd postgres
.- This will prompt you to enter a new password for user
postgres
(note that the password will not be shown when typing)
- This will prompt you to enter a new password for user
- Close and reopen the terminal and the password should now be set.
- Install by running
- Create the sg_data database by running
createdb sg_data
- Check that the sg_data database is running
psql sg_data
(exit from psql with\q
)
- Check that the sg_data database is running
- Run
node seed.js
to fill out the sg_data database with dummy data contained in seed.js - Run
npm start
to start the application. Check on localhost:3000 to ensure that the app is running correctly. - If you have not already installed sg_admin and sg_public, make sure to get those set up as well.
The app should look like this:
- Clone the repository and make note of the repo's location.
- If it is not installed already, install Node.js onto your machine.
- If you use Homebrew, it can be accomplished by running
brew install node
- Ensure the installation was successful by checking the version by running
node -v
ornode --version
.
- If you use Homebrew, it can be accomplished by running
- If it is not installed already, continue by installing npm onto your machine as well
- Check that npm is installed by checking the version using
npm -v
ornpm -version
.
- Check that npm is installed by checking the version using
- Navigate into the project directory, and run
npm install
to install all the necessary modules for sg_data to properly run. - Continue by installing Postgres(https://www.postgresql.org) onto your system.
- Install by running
brew install postgresql
- Set the password for default user
postgres
by runningsudo passwd postgres
.- This will prompt you to enter a new password for user
postgres
(note that the password will not be shown when typing)
- This will prompt you to enter a new password for user
- Close and reopen the terminal and the password should now be set.
- Install by running
- Create the sg_data database by running
createdb sg_data
- Check that the sg_data database is running
psql sg_data
(exit from psql with\q
)
- Check that the sg_data database is running
- Run
node seed.js
to fill out the sg_data database with dummy data contained in seed.js - Run
npm start
to start the application. Check on localhost:3000 to ensure that the app is running correctly. - If you have not already installed sg_admin and sg_public, make sure to get those set up as well.