Django-React-Heroku-Test
This implements the "Electoral" voting application, which when finished will use Django and Postgres for the backend, and React with Typescript for the frontend.
Live demo running here: https://rcf-electoral.herokuapp.com/
Done:
- Set up Django app
- Set up React app
- Get data from Django in React with Axios
- Set up Postgres database in Django
- Create test model and ensure database works
- Convert React app to Typescript
- Add react-router
- POST data to backend from frontend, on prod & dev.
ToDo:
- Add Google OAuth for gapps-domain authentication
Development
Before development, add a .env
file with the following contents:
DATABASE_URL=postgres:// (insert heroku postgres URL)
To develop, run in separate terminal windows:
# Window 0
python manage.py runserver
# Window 1
cd electoral-frontend
yarn start