Boilerplate code for setting up a Flask and React / Redux project. Built on top of the Flask and React boilerplate project. Also includes a Webpack build and boilerplate pytests.
Made with the following tutorials and the occasional SO:
Install and run the Flask and React apps to get started.
- Install
python
,pip
,virtualenv
. - Create virtualenv:
virtualenv env
- Activate it:
source env/bin/activate
- Install dependencies:
pip install -r requirements.txt
Test boilerplate provided.
pytest
To run the Flask server, run:
python run.py
Then, open http://localhost:5000/api/entries/ in a browser.
You should see the response:
[]
- Install
node
andnpm
. npm install
.npm run build
.
To start the Webpack dev server, run:
npm start
This will run the Webpack dev server on port 8080.
With the Flask server running, open http://localhost:5000/ in a browser.
You should see the "Hello World!" page.
Change something in app/static/js/app.js
.
Change something in app/static/sass/app.css
.
Changes should be reflected immediately in the browser.
See LICENSE.