https://github.com/khouloudhaddad/flaspy
Flask + React with Vite: Full Stack Web Application (Python Backend & React Frontend)
https://github.com/khouloudhaddad/flaspy
flask-api jsonify python react rest-api
Last synced: 24 days ago
JSON representation
Flask + React with Vite: Full Stack Web Application (Python Backend & React Frontend)
- Host: GitHub
- URL: https://github.com/khouloudhaddad/flaspy
- Owner: khouloudhaddad
- Created: 2024-10-16T21:35:00.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-16T22:51:10.000Z (over 1 year ago)
- Last Synced: 2025-01-10T10:26:48.498Z (over 1 year ago)
- Topics: flask-api, jsonify, python, react, rest-api
- Language: Python
- Homepage:
- Size: 5.74 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flaspy
Flaspy is a full-stack web application combining a Flask-based Python backend with a React frontend powered by Vite. This project demonstrates how to integrate a modern JavaScript frontend framework with a Python backend, offering a smooth development experience with fast refresh times and robust build tools.
## Create Front-end
```
npx create-vite
```
- Project name: client
- React
- Javascript
- Proceed with remaining steps
## Create Back-end (Commands are proper to Windows environment)
1- Create a folder "server"
2- Run the following command to create a virtual environment entitled "venv"
```
python -m venv venv
```
3- Activate environment by running the following command
```
venv\Scripts\activate
```
4- Install Flask dependency
```
pip install Flask
```
5- Create "server\main.py" file
6- Enable CORS in server
```
pip install FLASK-CORS
```
## FETCH API
- In the client, install axios
```
npm i axios
```