Skip to content

stevenernst131/python-and-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python + React

A full-stack app where a Flask backend serves a Vite-built React frontend — one process, one port.

Quick Start

# Install dependencies
pip install -r requirements.txt
cd frontend && npm install && npm run build && cd ..

# Run
python app.py

Open http://localhost:5000.

Project Structure

├── app.py              # Flask backend (serves React + API)
├── requirements.txt    # Python dependencies
└── frontend/
    ├── package.json    # React/Vite dependencies
    ├── vite.config.js  # Dev proxy config
    ├── index.html
    └── src/
        ├── main.jsx
        ├── App.jsx
        ├── App.css
        └── index.css

API

Endpoint Description
GET /api/hello Returns a JSON greeting

Development

For hot-reload during frontend development:

# Terminal 1 — Flask API
python app.py

# Terminal 2 — Vite dev server (proxies /api to Flask)
cd frontend && npm run dev

Rebuild before running in production mode:

cd frontend && npm run build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •