The project runs on PostgresDB.
-
Install Postgres's Command Line Interface:
psql
. -
Create a user and a database using Postgres.
-
Run
cd database
source init_database.sh [port] [user] [database]
- If you have not explicitly set up a port, it's usually
5432
.
- Change to
backend
folder
cd backend
- In the
backend
folder, add file calledconfigs
with your database connection parameters. Copy fromconfigs-example
and fill in your credentials. The file looks like:
[dbname]
[username]
[password] # if you do not have a password, leave an empty line
[host] # if running on local -> "localhost"
[port] # if not explicitly set up, leave an empty line
# important to keep an empty new line here
- (Optional) create your own virtual enviornment for the project:
python3 -m venv env; source env/bin/activate
- Install the required python packages:
pip install -r ./requirements.txt
- Run the application
python ./main.py
Start the frontend server.
cd frontend
npm install
npm run startApp
After running the application locally, below are some interesting links for some features to the app.
localhost:4200/getCourseInfo?course=cs%20488
- To connect with database, run:
psql -p [port] -U [user] -d [database] [-p password]
-
After connection, in
psql
, use\l
to list databases\d
to list databases\c
to connect to database\q
to exit postgresDrop DATABASE [Database_name]
to drop a databaseCREATE DATABASE [Database_name]
to create a database
-
Alternatively, run
psql -p [port] -U [user] -d [database] [-p password] -f [filename.sql]
to run a SQL file.