Move dev servers to ports 8002 and 5172
Backend now runs on 8002 and the frontend dev server on 5172, with the proxy, CORS origins and the run_*.bat launchers updated to match. The launchers also activate the venv so they work from a clean shell. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -105,7 +105,7 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
|||||||
AUTH_USER_MODEL = 'api.User'
|
AUTH_USER_MODEL = 'api.User'
|
||||||
|
|
||||||
# CORS Configuration
|
# CORS Configuration
|
||||||
_cors_default = 'http://localhost:3000,http://127.0.0.1:3000,http://localhost:5174,http://127.0.0.1:5174'
|
_cors_default = 'http://localhost:5172,http://127.0.0.1:5172,http://localhost:3000,http://127.0.0.1:3000,http://localhost:5174,http://127.0.0.1:5174'
|
||||||
CORS_ALLOWED_ORIGINS = os.getenv('CORS_ALLOWED_ORIGINS', _cors_default).split(',')
|
CORS_ALLOWED_ORIGINS = os.getenv('CORS_ALLOWED_ORIGINS', _cors_default).split(',')
|
||||||
CORS_ALLOW_CREDENTIALS = True
|
CORS_ALLOW_CREDENTIALS = True
|
||||||
CORS_ALLOW_HEADERS = [
|
CORS_ALLOW_HEADERS = [
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
REACT_APP_API_URL=http://localhost:8000
|
PORT=5172
|
||||||
|
REACT_APP_API_URL=http://localhost:8002
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
|
"dev": "react-scripts start",
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"test": "react-scripts test",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
@@ -33,5 +34,5 @@
|
|||||||
"last 1 safari version"
|
"last 1 safari version"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"proxy": "http://localhost:8000"
|
"proxy": "http://localhost:8002"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
python .\serial_bridge\app.py
|
@echo off
|
||||||
|
call "%~dp0.venv\Scripts\activate.bat"
|
||||||
|
python "%~dp0serial_bridge\app.py"
|
||||||
|
|||||||
+4
-2
@@ -1,2 +1,4 @@
|
|||||||
cd .\backend\
|
@echo off
|
||||||
uvicorn scalesapp.asgi:application --host 127.0.0.1 --port 8000 --reload
|
call "%~dp0.venv\Scripts\activate.bat"
|
||||||
|
cd /d "%~dp0backend"
|
||||||
|
uvicorn scalesapp.asgi:application --host 127.0.0.1 --port 8002 --reload
|
||||||
|
|||||||
+3
-1
@@ -1 +1,3 @@
|
|||||||
python .\test_comport_writer\test_writer.py
|
@echo off
|
||||||
|
call "%~dp0.venv\Scripts\activate.bat"
|
||||||
|
python "%~dp0test_comport_writer\test_writer.py"
|
||||||
|
|||||||
Reference in New Issue
Block a user