FlaskReact-Demo/README.md

39 lines
813 B
Markdown
Raw Permalink Normal View History

2026-01-03 13:19:49 -05:00
# Flask + React Example
Basic example with a Flask API and a React frontend (Vite).
2026-01-04 10:36:37 -05:00
## Publish to CitadelHosts.com
**All `podman` commands can be replaced with `docker`**
```
podman login registry.citadelhosts.com
podman build -t registry.citadelhosts.com/react-frontend:latest frontend
podman build -t registry.citadelhosts.com/flask-backend:latest backend
podman image push registry.citadelhosts.com/react-frontend:latest
podman image push registry.citadelhosts.com/flask-backend:latest
```
2026-01-03 13:19:49 -05:00
## 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.