26 lines
400 B
Markdown
26 lines
400 B
Markdown
# Flask + React Example
|
|
|
|
Basic example with a Flask API and a React frontend (Vite).
|
|
|
|
## Backend
|
|
|
|
```bash
|
|
cd backend
|
|
python -m venv .venv
|
|
source .venv/bin/activate
|
|
pip install -r requirements.txt
|
|
python app.py
|
|
```
|
|
|
|
Flask will run on `http://localhost:5000`.
|
|
|
|
## Frontend
|
|
|
|
```bash
|
|
cd frontend
|
|
npm install
|
|
npm run dev
|
|
```
|
|
|
|
Vite will run on `http://localhost:5173` and proxy `/api` to the Flask server.
|