From de038dba7c49c34cff9370b62a3359e56636b08f Mon Sep 17 00:00:00 2001
From: parsa aghaei
Date: Tue, 25 Aug 2026 10:26:01 +0330
Subject: [PATCH] fix(dev): switch frontend dev port from 4000 to 4005 due to
Windows port exclusion
---
frontend/admin-panel/src/pages/Products.tsx | 2 +-
frontend/application/package.json | 2 +-
scripts/open-browsers.js | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/frontend/admin-panel/src/pages/Products.tsx b/frontend/admin-panel/src/pages/Products.tsx
index e3136895..e348232b 100644
--- a/frontend/admin-panel/src/pages/Products.tsx
+++ b/frontend/admin-panel/src/pages/Products.tsx
@@ -85,7 +85,7 @@ export default function Products() {
const getStoreProductUrl = (slug: string) => {
const isDev = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1';
if (isDev) {
- return `http://localhost:4000/shop/${slug}`;
+ return `http://localhost:4005/shop/${slug}`;
}
// Production fallback based on actual URL
const storeOrigin = window.location.origin.replace('admin', 'www');
diff --git a/frontend/application/package.json b/frontend/application/package.json
index 624fc8cb..07cfe6a3 100644
--- a/frontend/application/package.json
+++ b/frontend/application/package.json
@@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
- "dev": "next dev -p 4000",
+ "dev": "next dev -p 4005",
"build": "next build",
"start": "next start",
"lint": "eslint"
diff --git a/scripts/open-browsers.js b/scripts/open-browsers.js
index fb779140..1f57137b 100644
--- a/scripts/open-browsers.js
+++ b/scripts/open-browsers.js
@@ -2,7 +2,7 @@ const { exec } = require('child_process');
const http = require('http');
const URLS = [
- { url: 'http://localhost:4000', name: 'Frontend Store' },
+ { url: 'http://localhost:4005', name: 'Frontend Store' },
{ url: 'http://127.0.0.1:5050', name: 'Admin Panel' },
{ url: 'http://localhost:4001/api/docs', name: 'Backend API Docs' }
];