[English] | 日本語
A sample web application using Django and React, integrated with Inertia.
pip install -r requirements.txt
cd frontend
npm i
Run each commands in different terminals.
python manage.py runserver 8080
cd frontend
npm run dev
Make sure that you should modify djangoReactApp/settings.py
as below.
# SECURITY WARNING: don't run with debug turned on in production!
-DEBUG = True
+DEBUG = False
-ALLOWED_HOSTS = []
+ALLOWED_HOSTS = ["localhost"] # add hosts which you're going to use
Run commands below.
cd frontend
npm run build
cd ..
python manage.py collectstatic
python manage.py runserver 8080 # add --insecure if you want to host assets too