Skip to content

kjplunkett/flask-react-starter-kit

Repository files navigation

Flask Create React App Boilerplate

Starter kit for local web development with a Flask backend + React frontend

Development

Prerequisites

Prerequisites: Node: nvm Python: pyenv and pyenv-virtualenv

Python Dependencies

Ensure you have the correct version of python installed

pyenv install

If you get a prompt about the version already existing, cancel that command and move on.

Create a new virtualenv

pyenv virtualenv flask-react-starter-kit

Activate the virtualenv

pyenv activate flask-react-starter-kit

Install python dependencies

pip install -r requirements.txt

Node Dependencies

Ensure you have the correct version of node installed

nvm install

If you get a prompt about the version already existing, cancel that command and move on.

Install node dependencies

npm install

Configuration

Copy the example environment variables file

cp .env.example .env.local

Usage

Start the frontend

npm run start

In a new shell, start the backend

flask run

Load the frontend in your browser

http://localhost:3000

Testing

Run frontend tests

npm run test

Run backend tests

pytest

TODO

  • Finish boilerplate setup
  • Add tests
  • Linting, Formatting
  • Finish README
  • Containerize