Group exam project for the DAT320 Web Programming course
Grade: A
-
Open a New Terminal: Open a new terminal window or tab.
-
Navigate to the Backend Directory: Change to the backend directory from the root of the project.
cd backend
-
Create a Virtual Environment: Create a Python virtual environment in the current directory.
python -m venv .venv
-
Activate the Virtual Environment:
- On Windows:
.venv\Scripts\activate
- On macOS/Linux:
source .venv/bin/activate
- On Windows:
-
Install Required Packages: Install all dependencies listed in
requirements.txt
.pip install -r requirements.txt
-
Set Environment Variable: Set the Flask environment variable to production.
- On Windows:
$env:FLASK_ENV="production"
- On macOS/Linux:
export FLASK_ENV=production
- On Windows:
-
Start flask server: Run the flask server to serve static files
flask run
-
Open a New Terminal: Open a new terminal window or tab.
-
Navigate to the Frontend Directory: Change to the frontend directory from the root of the project.
cd frontend
-
Install Dependencies: Install all required dependencies using npm.
npm install
-
Start the Development Server: Launch the frontend development server.
npm run dev
-
Open a New Terminal: Open a separate terminal window or tab for the backend setup.
-
Navigate to the Backend Directory: Change to the backend directory from the root of the project.
cd backend
-
Create a Virtual Environment: Create a Python virtual environment in the current directory.
python -m venv .venv
-
Activate the Virtual Environment:
- On Windows:
.venv\Scripts\activate
- On macOS/Linux:
source .venv/bin/activate
- On Windows:
-
Install Required Packages: Install all dependencies listed in
requirements.txt
.pip install -r requirements.txt
-
Set Environment Variable: Set the Flask environment variable to development
- On Windows:
$env:FLASK_ENV="development"
- On macOS/Linux:
export FLASK_ENV=development
- On Windows:
-
Start the Backend Server: Run the backend server with debug mode enabled. This command starts the Flask server.
flask run --debug