Port numaraları değişti.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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']
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user