Use Case
One repo with /frontend and /backend. You want each workspace to spin up both services with isolated ports and predictable URLs.
Documentation
Use this when frontend and backend live in one repo and both run directly on your machine.
One repo with /frontend and /backend. You want each workspace to spin up both services with isolated ports and predictable URLs.
FRONTEND_PORT
API_PORTSeparate reserved ports keep frontend/backend stable per workspace and prevent collisions across branches.
cd frontend && npm i
cd ../backend && pip install -r requirements.txt
cp /shared/.env .envBootstraps both app layers. Copying .env gives per-workspace config freedom. Symlink centralizes updates but can cause cross-workspace side effects.
cd frontend && API_URL=http://localhost:$API_PORT PORT=$FRONTEND_PORT npm run dev
cd backend && python manage.py runserver 0.0.0.0:$API_PORTFrontend points to the workspace backend port. Both processes stay in one workspace context with shared named-port env vars.
http://localhost:$FRONTEND_PORT
http://localhost:$API_PORT/adminOpens both frontend preview and Django admin for the same workspace.
curl -fsS http://localhost:$FRONTEND_PORT
curl -fsS http://localhost:$API_PORT/healthSeparate checks help isolate whether failures are in frontend, backend, or integration between the two.