Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
urstrulynishkarsh committed Mar 8, 2024
1 parent a40e84c commit f4eaff8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ app.use(cors({
origin: 'http://localhost:3000', // Adjust this based on your React app's origin
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
credentials: true,
transports: ['websocket','https','http'],
transports: ['websocket'],
}));


// io.set('transports', ['websocket']); // Set WebSocket as the only transport


io.on('connection',(socket)=>{
console.log('New WebSocket Connection');
Expand Down
2 changes: 1 addition & 1 deletion src/Components/ChatPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import toast from 'react-hot-toast';



const socket = io('ws://socketio-env.eba-3jitqgnh.ap-south-1.elasticbeanstalk.com/', { transports: ['websocket','https','http'] });
const socket = io('ws://socketio-env.eba-3jitqgnh.ap-south-1.elasticbeanstalk.com/', { transports: ['websocket'] });

const ChatPage = () => {

Expand Down

0 comments on commit f4eaff8

Please sign in to comment.