/flask-react

Example boilerplate for serving a react app from flask with hot reload support in dev

Primary LanguageJavaScriptMIT LicenseMIT

Prerequisites

This project was set up with yarn and poetry.

Installation

Install client dependencies:

$ cd client
$ yarn install

Install server dependencies:

$ cd server
$ poetry install --no-root

Usage

Development

Start the webpack dev server:

$ cd client
$ yarn start

Start the flask app in dev mode:

$ cd server
$ poetry run flask run

Production

Build your static assets with webpack:

$ cd client
$ yarn build

Start the flask app in production mode:

$ cd server
$ FLASK_ENV=production poetry run flask run