Update MongoDB connection settings and enhance debugging capabilities

This commit is contained in:
2026-01-28 15:54:33 +05:30
parent 5b02a13cb4
commit e9e5eb32ad
14 changed files with 162 additions and 12 deletions
+3 -1
View File
@@ -13,7 +13,7 @@ function App() {
const [playerSocket, setPlayerSocket] = useState();
const [redirect, setRedirect] = useState();
useEffect(() => {
const socket = io(`${window.location.protocol}//${window.location.host}`, { withCredentials: true });
const socket = io(`http://${window.location.hostname}:8080`, { withCredentials: true });
socket.on('player:data', data => {
data = JSON.parse(data);
setPlayerData(data);
@@ -72,3 +72,5 @@ function App() {
</SocketContext.Provider>
);
}
export default App;
+1 -1
View File
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import App from './App.js';
const container = document.getElementById('root');
const root = ReactDOM.createRoot(container);