From 5557b2a11917e0300e3e970c7ad3a6424e7b2693 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Mon, 1 Nov 2021 08:24:24 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Testing=20out=20a=20potential=20?= =?UTF-8?q?solution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/constants/endpoints.ts | 25 ++++++++++--------------- src/client/store/index.ts | 5 +++-- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/client/constants/endpoints.ts b/src/client/constants/endpoints.ts index 932afff..c021c6e 100644 --- a/src/client/constants/endpoints.ts +++ b/src/client/constants/endpoints.ts @@ -11,39 +11,34 @@ export const hostURIBuilder = (options: Record): string => { export const COMICBOOKINFO_SERVICE_URI = hostURIBuilder({ protocol: "http", - // host: process.env.DOCKER_HOST || "localhost", - host: "localhost", + host: process.env.DOCKER_HOST || "localhost", port: "3080", apiPath: "/api/comicvine", }); export const API_BASE_URI = hostURIBuilder({ protocol: "http", - host: "localhost", - // host: process.env.DOCKER_HOST || "localhost", + host: process.env.DOCKER_HOST || "localhost", port: "8050", apiPath: "/api", }); export const IMPORT_SERVICE_HOST = hostURIBuilder({ protocol: "http", - // host: process.env.DOCKER_HOST || "localhost", - host: "localhost", + host: process.env.DOCKER_HOST || "localhost", port: "3000", apiPath: ``, }); export const IMPORT_SERVICE_BASE_URI = hostURIBuilder({ protocol: "http", - // host: process.env.DOCKER_HOST || "localhost", - host: "localhost", + host: process.env.DOCKER_HOST || "localhost", port: "3000", apiPath: "/api/import", }); -// export const SOCKET_BASE_URI = hostURIBuilder({ -// protocol: "http", -// // host: process.env.LIBRARY_SOCKET_HOST || "localhost", -// host: "localhost", -// port: "3001", -// apiPath: `/`, -// }); +export const SOCKET_BASE_URI = hostURIBuilder({ + protocol: "http", + host: process.env.LIBRARY_SOCKET_HOST || "localhost", + port: "3001", + apiPath: `/`, +}); diff --git a/src/client/store/index.ts b/src/client/store/index.ts index d93c04e..f29bea6 100644 --- a/src/client/store/index.ts +++ b/src/client/store/index.ts @@ -5,8 +5,9 @@ import thunk from "redux-thunk"; import createRootReducer from "../reducers"; import { io } from "socket.io-client"; import socketIoMiddleware from "redux-socket.io-middleware"; -// import { SOCKET_BASE_URI } from "../constants/endpoints"; -const socketConnection = io(`http://rook:3001`); +import { SOCKET_BASE_URI } from "../constants/endpoints"; + +const socketConnection = io(SOCKET_BASE_URI); export const history = createBrowserHistory(); const configureStore = (initialState) => {