/django-react-quickstart

Quickstart for a Django backend | React frontend project

Primary LanguagePython

Quickstart Django & React Repository

This repository contains a preconfigured Django 4.0.5 with React project. Django comes configured to use React's build files as its templates and takes them into a 'static/' directory using python manage.py collectstatic out of the box.

This repository has Django Rest Framework, Django Cors Headers and Django Rest SimpleJWT setup for you in the settings.py

The React frontend comes with TailwindCSS pre-installed.

Setting up the environment

  1. Clone the repository
git clone https://github.com/kmanjt/django-react-quickstart.git
  1. Create a virtual environment and activate it
python -m venv venv
source venv/bin/activate
  1. Install the required packages from the backend/ directory
pip install -r requirements.txt
  1. Set up the environment variables which are shown in .env.example in backend/ directory

  2. Set up the database

python manage.py migrate
  1. Run the development servers (from backend/ and frontend/)
python manage.py runserver
npm start