- Backend: http://localhost:8001 (FIXED)
- Frontend: http://localhost:3001 (FIXED)
- API Docs: http://localhost:8001/api/docs
π VideoCraft/
βββ start-videocraft.bat β Double-click this file
powershell -ExecutionPolicy Bypass -File start-videocraft.ps1# Terminal 1 (Backend on 8001)
cd backend
python simple_main.py
# Terminal 2 (Frontend on 3001)
cd frontend
npm startbackend/simple_main.py- Defaults to port 8001backend/main.py- Defaults to port 8001backend/.env- PORT=8001
frontend/.env- PORT=3001frontend/package.json- Scripts use PORT=3001- CORS configured for localhost:3001 only
- Backend CORS: Only allows connections from localhost:3001
- Frontend .env: Hardcoded to PORT=3001
- Package.json: Scripts enforce PORT=3001
- Startup Scripts: All use fixed 8001/3001 ports
- API URLs: Frontend configured to call localhost:8001
- Port conflicts: If ports are in use, you must manually stop the conflicting services
- No auto-port changing: Scripts will not automatically try different ports
- Consistent behavior: All startup methods use the same fixed ports
- CORS security: Backend only accepts connections from the designated frontend port
- Start backend: Should run on http://localhost:8001
- Start frontend: Should run on http://localhost:3001
- Test API: Frontend should successfully connect to backend
- Check CORS: Only localhost:3001 allowed in backend
To free up the ports:
# Check what's using the ports
netstat -ano | findstr :8001
netstat -ano | findstr :3001
# Kill processes (replace PID with actual process ID)
taskkill /PID <PID> /FIf you specifically need different ports, you would need to:
- Update
backend/.env - Update
frontend/.env - Update CORS settings in backend files
- Update startup scripts
β VideoCraft is now configured to ALWAYS use ports 8001/3001 unless manually instructed otherwise.