Skip to content

advantch/django-react-vite

Repository files navigation

Advantch Django, React & Vite Starter

Getting Started

Installing Dependencies

Python 3.7

Follow instructions to install the latest version of python for your platform in the python docs

Virtual Environment

We recommend working within a virtual environment whenever using Python for projects. This keeps your dependencies for each project separate and organized.

Instructions for setting up a virual enviornment for your platform can be found in the python docs

An example with MacOS and Python3

python3 -m venv .venv
source .venv/bin/activate

PIP Dependencies

Once you have your virtual environment setup, run the following to install the project requirements:

pip install -r requirements.txt

Running the server

To run the server

python manage.py runserver

NPM & node installation

Follow the instructions here

Running the Vite dev server

To run the server

npm install
npm run dev

Build your production assets

npm run build

Testing

pytest

Docker

docker build -t django-react .
docker run -dp 8000:8000 django-react