Skip to content

Commit fe45e2f

Browse files
Change server port numbers (#934)
* Update server port numbers to 52123 and 52124 across the application
1 parent cfb5ade commit fe45e2f

11 files changed

Lines changed: 30 additions & 29 deletions

File tree

backend/app/config/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
MODEL_EXPORTS_PATH = "app/models/ONNX_Exports"
33

44
# Microservice URLs
5-
SYNC_MICROSERVICE_URL = "http://localhost:8001"
5+
SYNC_MICROSERVICE_URL = "http://localhost:52124"
66

77
CONFIDENCE_PERCENT = 0.6
88
# Object Detection Models:

backend/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async def lifespan(app: FastAPI):
7070
"url": "https://www.postman.com/aossie-pictopy/pictopy/overview",
7171
},
7272
servers=[
73-
{"url": "http://localhost:8000", "description": "Local Development server"}
73+
{"url": "http://localhost:52123", "description": "Local Development server"}
7474
],
7575
)
7676

@@ -142,7 +142,7 @@ async def root():
142142
config = Config(
143143
app=app,
144144
host="0.0.0.0",
145-
port=8000,
145+
port=52123,
146146
log_level="info",
147147
log_config=None, # This is crucial - disable Uvicorn's default logging config
148148
)

docs/Manual_Setup_Guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ git remote add upstream https://github.com/AOSSIE-Org/PictoPy
9898
Bash/Powershell
9999
100100
```
101-
fastapi dev
101+
fastapi dev --port 52123
102102
```
103103
104-
The server will start on `http://localhost:8000` by default. In test mode, the server will automatically restart if any errors are detected or if source files are modified.
104+
The server will start on `http://localhost:52123` by default. In test mode, the server will automatically restart if any errors are detected or if source files are modified.
105105
106106
![alt text](/docs/assets/screenshots/serverRunning.png)
107107
@@ -160,10 +160,10 @@ git remote add upstream https://github.com/AOSSIE-Org/PictoPy
160160
Bash/Powershell
161161
162162
```
163-
uvicorn main:app --port 8001 --reload
163+
fastapi dev --port 52124
164164
```
165165
166-
The server will start on `http://localhost:8001` by default. In development mode, the server will automatically restart if any errors are detected or if source files are modified.
166+
The server will start on `http://localhost:52124` by default. In development mode, the server will automatically restart if any errors are detected or if source files are modified.
167167
168168
### Troubleshooting Common Issues:
169169

docs/Script_Setup_Guide.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
- [Windows](https://youtu.be/nNVAE4or280?si=j_y9Xn8Kra6tPHjw)
66
- [Ubuntu (Debian)](https://www.youtube.com/watch?v=a7I0ZRE-SHk)
77

8+
> Note that the Step No. 8 given below is not mentioned in the video, please follow that step also.
9+
810
### Prerequisites:
911

1012
- [NodeJS](https://nodejs.org/en) (LTS Version Recommended)
@@ -49,15 +51,15 @@
4951
```powershell
5052
cd .\backend
5153
.env\Scripts\Activate.ps1
52-
fastapi dev
54+
fastapi dev --port 52123
5355
```
5456

5557
#### Linux
5658

5759
```bash
5860
cd ./backend
5961
source .env/bin/activate
60-
fastapi dev
62+
fastapi dev --port 52123
6163
```
6264

6365
8. Start the Sync-Microservice
@@ -69,15 +71,15 @@
6971
```powershell
7072
cd .\sync-microservice
7173
.sync-env\Scripts\Activate.ps1
72-
uvicorn main:app --port 8001 --reload
74+
fastapi dev --port 52124
7375
```
7476

7577
#### Linux
7678

7779
```bash
7880
cd ./sync-microservice
7981
source .sync-env/bin/activate
80-
uvicorn main:app --port 8001 --reload
82+
fastapi dev --port 52124
8183
```
8284

8385
9. Start the Frontend Desktop App
@@ -91,10 +93,10 @@
9193

9294
10. Pre-commit Setup
9395

94-
Before running the `git commit` command, ensure you have the following Python packages installed globally:
96+
Before running the `git commit` command, ensure you have the following Python packages installed globally:
9597

96-
```bash
97-
pip install ruff black mypy pre-commit
98-
```
98+
```bash
99+
pip install ruff black mypy pre-commit
100+
```
99101

100-
> **Note:** If you are committing from a virtual environment, these packages should already be installed as they are included in the requirements.txt file.
102+
> **Note:** If you are committing from a virtual environment, these packages should already be installed as they are included in the requirements.txt file.

docs/backend/backend_python/openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"servers": [
1313
{
14-
"url": "http://localhost:8000",
14+
"url": "http://localhost:52123",
1515
"description": "Local Development server"
1616
}
1717
],

frontend/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"scope": ["**"],
6363
"enable": true
6464
},
65-
"csp": "default-src 'self'; img-src 'self' data: asset: http://asset.localhost; media-src 'self' blob: data:; connect-src 'self' ipc: http://ipc.localhost http://localhost:8000 ws://localhost:8000 http://localhost:8001 ws://localhost:8001"
65+
"csp": "default-src 'self'; img-src 'self' data: asset: http://asset.localhost; media-src 'self' blob: data:; connect-src 'self' ipc: http://ipc.localhost http://localhost:52123 ws://localhost:52123 http://localhost:52124 ws://localhost:52124"
6666
}
6767
}
6868
}

frontend/src/config/Backend.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export const BACKEND_URL = 'http://localhost:8000';
2-
export const SYNC_MICROSERVICE_URL = 'http://localhost:8001';
1+
export const BACKEND_URL = 'http://localhost:52123';
2+
export const SYNC_MICROSERVICE_URL = 'http://localhost:52124';

frontend/src/hooks/useFolderOperations.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ export const useFolderOperations = () => {
101101
useMutationFeedback(enableAITaggingMutation, {
102102
showLoading: true,
103103
loadingMessage: 'Enabling AI tagging',
104-
successTitle: 'AI Tagging Enabled',
105-
successMessage: 'AI tagging has been enabled for the selected folder.',
104+
showSuccess: false,
106105
errorTitle: 'AI Tagging Error',
107106
errorMessage: 'Failed to enable AI tagging. Please try again.',
108107
});

sync-microservice/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ A file system synchronization microservice for PictoPy that monitors folder chan
4141

4242
4. **Start the service:**
4343
```bash
44-
uvicorn main:app --reload --port 8001
44+
fastapi dev --port 52124
4545
```
4646

4747
## API Endpoints
@@ -147,7 +147,7 @@ The file watcher currently logs changes but doesn't process them. Future enhance
147147
Use the health endpoint to monitor service status:
148148

149149
```bash
150-
curl http://localhost:8001/health
150+
curl http://localhost:52124/health
151151
```
152152

153153
## Troubleshooting
@@ -185,8 +185,8 @@ The service provides detailed console output for:
185185

186186
This microservice is designed to work alongside the main PictoPy backend:
187187

188-
- **Port 8000**: Main PictoPy backend
189-
- **Port 8001**: Sync microservice (this service)
188+
- **Port 52123**: Main PictoPy backend
189+
- **Port 52124**: Sync microservice (this service)
190190
- **Shared Database**: Both services use the same SQLite database
191191

192192
The sync service operates independently but relies on the main backend's database structure.

sync-microservice/app/config/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Model Exports Path
22
MODEL_EXPORTS_PATH = "app/models/ONNX_Exports"
3-
PRIMARY_BACKEND_URL = "http://localhost:8000"
4-
SYNC_MICROSERVICE_URL = "http://localhost:8001"
3+
PRIMARY_BACKEND_URL = "http://localhost:52123"
4+
SYNC_MICROSERVICE_URL = "http://localhost:52124"
55

66
# Object Detection Models:
77
SMALL_OBJ_DETECTION_MODEL = f"{MODEL_EXPORTS_PATH}/YOLOv11_Small.onnx"

0 commit comments

Comments
 (0)