poetry init
poetry add Django@4
django-admin startproject backend .
poetry run python manage.py runserver 8080npm create vite@latest frontend
✔ Select a framework: › React
✔ Select a variant: › TypeScript + SWC
Scaffolding project in /Users/yuta.okada/local/django-inertia-react-example/frontend...
Done. Now run:
cd frontend
npm install
npm run devpoetry add inertia-django django-vitenpm install -D @types/node
npm install -D @inertiajs/reactRun the following command in the root dir.
poetry run python manage.py runserver 8080Run the following command in the frontend dir.
cd frontend
npm run devThen, access to http://localhost:8080