Skip to content

Instantly share code, notes, and snippets.

@vdhanan
Created December 12, 2023 14:57
Show Gist options
  • Save vdhanan/b509dc7786b1e130720a05258f62df77 to your computer and use it in GitHub Desktop.
Save vdhanan/b509dc7786b1e130720a05258f62df77 to your computer and use it in GitHub Desktop.
test
diff --git a/web/root.js b/web/root.js
index 56e7b49af..a72bfa5b7 100644
--- a/web/root.js
+++ b/web/root.js
@@ -21,6 +21,7 @@ import App from './app.react.js';
import { SQLiteDataHandler } from './database/sqlite-data-handler.js';
import { localforageConfig } from './database/utils/constants.js';
import ErrorBoundary from './error-boundary.react.js';
+import { IdentityServiceClientWrapper } from './grpc/identity-service-client-wrapper.js';
import { defaultWebState } from './redux/default-state.js';
import InitialReduxStateGate from './redux/initial-state-gate.js';
import { persistConfig } from './redux/persist.js';
@@ -28,6 +29,14 @@ import { type AppState, type Action, reducer } from './redux/redux-setup.js';
import history from './router-history.js';
import Socket from './socket.react.js';
+// Create an instance of the wrapper
+const identityServiceClient = new IdentityServiceClientWrapper();
+
+void (() => {
+ const addr = identityServiceClient.determineSocketAddr();
+ console.log('Got socket addr: ', addr);
+})();
+
localforage.config(localforageConfig);
const persistedReducer = persistReducer(persistConfig, reducer);
@vdhanan
Copy link
Author

vdhanan commented Dec 12, 2023

Contents of my keyserver/secrets/identity_service_config.json file:

{
  "identitySocketAddr": "https://www.notarealurl.com:12345"
}

@vdhanan
Copy link
Author

vdhanan commented Dec 12, 2023

What I see in the console when i run web:

Got socket addr: "https://www.notarealurl.com:12345"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment