This project shows how to serve a simple react application created by create-react-app
with a flask server.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Ensure that you have the following tools available on your machine;
- Git A distributed version control system
- Python A general purpose programming language
- node A JavaScript runtime
- A tool to create isolated Python environments preferably Virtualenv
- Pip A tool for installing python packages
- create-react-app A supported way of creating single-page React applications
- yarn A package manager for javascript
While in your preferred terminal;
Start by cloning the repository to your local machine
git clone https://github.com/learningdollars/sushan-reactapp-flask.git
cd sushan-reactapp-flask/
Make and activate a python virtual environment using virtualenv
virtualenv venv
source venv/bin/activate
With the virtual environment activated, install the project dependencies for the flask server
pip3 install -r requirements.txt
cd react-app/
yarn install
You can start a local server by running
cd flask-server
python3 main.py
visit http://127.0.0.1:5000/ to view your application.
See also the list of contributors who participated in this project.