🔧 Testing variations for troubleshooting socket.io issues

This commit is contained in:
2021-10-30 19:04:49 -07:00
parent 843dee30a4
commit 8fc8bf7248
4 changed files with 105 additions and 96 deletions

View File

@@ -36,9 +36,9 @@ export const IMPORT_SERVICE_BASE_URI = hostURIBuilder({
apiPath: "/api/import",
});
export const SOCKET_BASE_URI = hostURIBuilder({
protocol: "http",
host: process.env.LIBRARY_SOCKET_HOST || "localhost",
port: "3001",
apiPath: `/`,
});
// export const SOCKET_BASE_URI = hostURIBuilder({
// protocol: "http",
// host: process.env.LIBRARY_SOCKET_HOST || "localhost",
// port: "3001",
// apiPath: `/`,
// });

View File

@@ -5,8 +5,8 @@ import thunk from "redux-thunk";
import createRootReducer from "../reducers";
import socketIO from "socket.io-client";
import socketIoMiddleware from "redux-socket.io-middleware";
import { SOCKET_BASE_URI } from "../constants/endpoints";
const io = socketIO(SOCKET_BASE_URI);
// import { SOCKET_BASE_URI } from "../constants/endpoints";
const io = socketIO(`ws://importapi:3001`);
export const history = createBrowserHistory();
const configureStore = (initialState) => {
const store = createStore(