This README provides instructions on how to set up the environment, install dependencies, and run the Flask application.
- Python 3.7 or higher installed on your system.
pip(Python package manager) installed.
-
Clone the Repository
Clone this repository to your local machine:git clone https://github.com/TeslaC00/Food-Stat cd Food-Stat/server -
Set Up a Virtual Environment
Create and activate a virtual environment:python -m venv venv source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows
-
Install Dependencies
Install the required Python packages:pip install -r requirements.txt
-
Install
uvand Sync It
Installuv(if applicable) and sync it:pip install uv
-
Activate the Virtual Environment
Ensure the virtual environment is activated:source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows
-
Run the Flask App
Start the Flask development server:flask run
-
Access the Application
Open your browser and navigate tohttp://127.0.0.1:5000.
When you're done, deactivate the virtual environment:
deactivate- Ensure
FLASK_APPis set if the app doesn't run:export FLASK_APP=app.py # On macOS/Linux set FLASK_APP=app.py # On Windows