Skip to content

Latest commit

 

History

History
88 lines (57 loc) · 1.49 KB

README.md

File metadata and controls

88 lines (57 loc) · 1.49 KB

Django-React-JWT

This project demonstrates how to implement user authentication in Django with communication to frontend technologies like React using JSON Web Tokens (JWT).

Getting Started

Clone the Repository

git clone https://github.com/sinasezza/django-react-jwt.git
cd django-react-jwt

Setup

Prerequisites

Make sure you have Python and Node.js installed on your system.

Install Dependencies

Install pipenv if you haven't already:

pip install pipenv

Set up the Python environment and install Python dependencies:

pipenv shell
pipenv install

Configure Frontend Settings

Install or Update Dependencies

To install or update frontend dependencies, use the provided management command:

Install dependencies:

pipenv run python manage.py npm install

Update dependencies:

pipenv run python manage.py npm update

Run the Frontend Server

To run the frontend server for development:

pipenv run python manage.py npm start

Build the Frontend for Production

To build the frontend for production:

pipenv run python manage.py npm build

Serve the Production Build

To serve the production build of the frontend:

pipenv run python manage.py npm serve

Start the Django HTTP Server

Apply migrations:

pipenv run python manage.py makemigrations
pipenv run python manage.py migrate

Run the Django development server:

pipenv run python manage.py runserver