This document provides instructions on how to set up and run the OTG Photography website locally for testing and development.
This must be run in a separate terminal tab/window.
- Navigate to the
backenddirectory:cd backend - Create and activate a Python virtual environment:
- On Windows (PowerShell):
python -m venv venv .\venv\Scripts\Activate.ps1
- On Windows (Command Prompt):
.\venv\Scripts\activate.bat
- On macOS/Linux:
source venv/bin/activate
- On Windows (PowerShell):
- Install dependencies:
pip install Flask Flask-SQLAlchemy Flask-Mail python-dotenv Flask-CORS
- Configure Environment Variables:
Create a
.envfile in thebackenddirectory with your email credentials for Flask-Mail.MAIL_USERNAME=your_email@example.com MAIL_PASSWORD=your_email_password - Run the Flask application:
The backend will typically run on
python -m flask --app app run
http://127.0.0.1:5000.
For more detailed backend instructions, including setting up Cal.com webhooks with ngrok, please see backend/README.md.
This must be run in another separate terminal tab/window.
- Navigate to the project's root directory:
cd C:\Users\laolu\OneDrive\Desktop\GIT\OTG
- Run a simple HTTP server for the frontend files:
This will typically serve your frontend on
python -m http.server
http://localhost:8000.
Open your web browser and go to http://localhost:8000 to view the website.