Created
November 2, 2023 01:20
-
-
Save vdhanan/15ffc5810425b8a22b7d3c5bd01a8d58 to your computer and use it in GitHub Desktop.
Test plan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/web/root.js b/web/root.js | |
index 0c169af56..628b6a786 100644 | |
--- a/web/root.js | |
+++ b/web/root.js | |
@@ -16,6 +16,9 @@ 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 { VersionInterceptor, AuthInterceptor } from './grpc/interceptor.js'; | |
+import * as IdentityClient from './protobufs/identity-client.cjs'; | |
+import { Empty } from './protobufs/identity-structs.cjs'; | |
import { defaultWebState } from './redux/default-state.js'; | |
import InitialReduxStateGate from './redux/initial-state-gate.js'; | |
import { persistConfig } from './redux/persist.js'; | |
@@ -23,6 +26,20 @@ import { type AppState, type Action, reducer } from './redux/redux-setup.js'; | |
import history from './router-history.js'; | |
import Socket from './socket.react.js'; | |
+const opts = { | |
+ unaryInterceptors: [ | |
+ new VersionInterceptor(), | |
+ new AuthInterceptor('alice', '1234', 'abcd'), | |
+ ], | |
+}; | |
+ | |
+const PromiseClient = IdentityClient.IdentityClientServicePromiseClient; | |
+const client = new PromiseClient('http://localhost:50054', null, opts); | |
+(async () => { | |
+ const result = await client.generateNonce(new Empty()); | |
+ console.log(`result: ${result.getNonce()}`); | |
+})(); | |
+ | |
localforage.config(localforageConfig); | |
const persistedReducer = persistReducer(persistConfig, reducer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment