Use case
Frontend and backend are separate repos. You want one workspace to run both processes and keep their browser sessions aligned.
Use this when frontend and backend live in different projects but you want one active workspace context for both.
Frontend and backend are separate repos. You want one workspace to run both processes and keep their browser sessions aligned.
The frontend project owns both the frontend and backend services and runs both processes, since it is the workspace that serves as the shared context for both.
Services: frontend, backend
Frontend process: API_URL=$SPACES_BACKEND_URL PORT=$SPACES_FRONTEND_PORT npm run dev
Backend process: cd /path/to/backend-project && python manage.py runserver 0.0.0.0:$SPACES_BACKEND_PORT
Browser session: $SPACES_FRONTEND_URLThe backend process starts from the frontend workspace so both processes receive the same SPACES_<SERVICE>_PORT and SPACES_<SERVICE>_URL variables Spaces sets for each service. The backend command can cd into the other repo directly, since a process command runs as shell input.