This is a super simple, monolithic app that uses server-side rendering to deliver precompiled React to the frontend that avoids further page requests by querying eve's REST API for data.
Install dependencies
apt-get install mongodb
pip install -r requirements.txt
npm install
webpack
Start the render server in a separate terminal
node render_server.js
Start the Python server in yet another terminal
python run.py
Visit http://127.0.0.1:8000
For a more production-y feel, you can also use gunicorn
gunicorn run:app --threads 2
Make sure you change run.py so it doesn't run in debug
mode anymore
and threaded=False
.
- @markfinger for python-react
- @nicolaiarocci for Eve
This code is not best-practice; it's minimum viable. It's meant to help one get started.