🔧 Fixed an erroneous use of process

This commit is contained in:
2021-10-19 12:46:53 -07:00
parent c3a91ef39f
commit b1ff7e78ba
2 changed files with 3 additions and 3 deletions

View File

@@ -1,4 +1,3 @@
export const COMICBOOKINFO_SERVICE_URI = "http://localhost:3080/api/comicvine/";
export const API_BASE_URI = "http://localhost:8050/api/";
export const SOCKET_BASE_URI =
process.env.DOCKERHOST + ":8051" || "ws://localhost:8051";
export const SOCKET_BASE_URI = "ws://localhost:8051";

View File

@@ -8,7 +8,8 @@ import { success } from "react-notification-system-redux";
const WebSocketContext = createContext(null);
export const WebSocketProvider = ({ children }): ReactElement => {
const dispatch = useDispatch();
const socket: Socket = io(SOCKET_BASE_URI);
const socketHost = process.env.DOCKERHOST + ":8051" || SOCKET_BASE_URI;
const socket: Socket = io(socketHost);
socket.on("connect", () => {
dispatch({