A Flask-and-PostgreSQL-based web app that recommends hobbies based on quiz results.
Natalie Tepedino
Manny Campbell
Yadhira Marcos-Avila
- Adam Kerns
- Leo Amromine
- Michael Gohn
- Sasank Pagadala
-
Clone the repo
git clone https://github.com/5GBs/SoftwareDev.git
-
Navigate to the Repo
# Navigate to the location of your file downloaded in step 1 (most likely titled 'SoftwareDev') # For example cd SoftwareDev
-
Create and Activate a Virtual Environment
# For MacOS/Linux: python3 -m venv venv source venv/bin/activate # For Windows: python -m venv venv venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Configure Environment Variables
# Create a new env file within the current folder # (should still be SoftwareDev) by running the command below: cp backend/.env.example .env # You will need to edit this file (.env) to create a new database.
-
Install Homebrew (if not installed)
# Open terminal and install /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Remember your password! You will need it later.
-
Make sure PostgreSQL is running
# Install PostgreSQ7 if not installed # For macOS: brew install postgresql #for Linux: sudo apt update sudo apt install postgresql postgresql-contrib sudo systemctl start postgresql # For Windows: # Download and install PostgreSQL from the following link https://www.postgresql.org/download/ # Start the PostgreSQL service using brew brew services start postgresql
-
Create the database
# Create the database (schema inside) createdb findmyhobby # If creatb is not available: psql -U postgres CREATE DATABASE findmyhobby; \q # Verify the database psql -d findmyhobby # List the tables within the database \dt
-
Exit the database
\q -
Edit the .env file
# Navigate to the .env file # Edit it so that the username is 'postgres' and the password is the one you used in step 7 DB_USER=postgres DB_PASS= 'your password'
-
Finally, Run the App!
# Visit the localhost given in the terminal # (Most likely 'http://127.0.0.1:5000') flask run