Port numaraları değişti.

This commit is contained in:
2025-11-07 01:08:52 +03:00
parent 673d53f126
commit aae63ee4d0
8 changed files with 17 additions and 17 deletions

View File

@@ -29,7 +29,7 @@
console.log('🔌 Connecting to Socket.IO...');
// Socket.IO bağlantısı
socket = io('http://localhost:3001');
socket = io('http://localhost:3005');
console.log('👤 Goods Manager ID:', user.id);

View File

@@ -4,7 +4,7 @@ let socket = null;
export function getSocketClient() {
if (!socket) {
socket = io('http://localhost:3001', {
socket = io('http://localhost:3005', {
transports: ['websocket', 'polling']
});

View File

@@ -72,7 +72,7 @@ const app = express();
const server = createServer(app);
const io = new Server(server, {
cors: {
origin: process.env.NODE_ENV === 'production' ? false : ["http://localhost:5173"],
origin: process.env.NODE_ENV === 'production' ? false : ["http://localhost:5005"],
methods: ["GET", "POST"]
}
});
@@ -80,7 +80,7 @@ const io = new Server(server, {
// Export io for use in other modules
export { io };
const PORT = process.env.PORT || 3001;
const PORT = process.env.PORT || 3005;
// ES Module equivalent of __dirname
const __filename = fileURLToPath(import.meta.url);

View File

@@ -117,7 +117,7 @@ const app = express();
const server = createServer(app);
const io = new Server(server, {
cors: {
origin: "http://localhost:5173",
origin: "http://localhost:5005",
methods: ["GET", "POST"]
}
});
@@ -125,7 +125,7 @@ const io = new Server(server, {
// Export io for use in other modules
export { io };
const PORT = process.env.PORT || 3001;
const PORT = process.env.PORT || 3005;
// ES Module equivalent of __dirname
const __filename = fileURLToPath(import.meta.url);