Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryanfleck/django-react-heroku-test
Test deployment - Django with React on Heroku.
https://github.com/ryanfleck/django-react-heroku-test
axios django react typescript
Last synced: 18 days ago
JSON representation
Test deployment - Django with React on Heroku.
- Host: GitHub
- URL: https://github.com/ryanfleck/django-react-heroku-test
- Owner: RyanFleck
- License: mit
- Created: 2020-06-09T01:31:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T21:36:51.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T07:56:35.088Z (7 months ago)
- Topics: axios, django, react, typescript
- Language: TypeScript
- Homepage: https://rcf-electoral.herokuapp.com/
- Size: 1.67 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
**Done:**
1. Set up Django app
1. Set up React app
1. Get data from Django in React with Axios
1. Set up Postgres database in Django
1. Create test model and ensure database works
1. Convert React app to Typescript
1. Add react-router
1. POST data to backend from frontend, on prod & dev.**ToDo:**
1. 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
```## Resources
1. [Primary
tutorial](https://librenepal.com/article/django-and-create-react-app-together-on-heroku/)
1. [Axios with React](https://alligator.io/react/axios-react/)
1. [Django docs- returning JSON](https://docs.djangoproject.com/en/3.0/ref/request-response/#jsonresponse-objects)
1. [Authentication with
Google](https://medium.com/trabe/oauth-authentication-in-django-with-social-auth-c67a002479c1)