Created
May 15, 2024 20:05
-
-
Save alexvy86/a9375b07ada3ea1d07d3cdbabb13465e to your computer and use it in GitHub Desktop.
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
import { createDevtoolsLogger, initializeDevtools } from "@fluidframework/devtools/beta"; | |
// Create a logger to pass to AzureClient and to Devtools | |
const logger = createDevtoolsLogger(); | |
// Pass the logger in properties when instantiating an AzureClient | |
const clientProps = { | |
connection: connectionConfig, | |
logger, | |
}; | |
const client = new AzureClient(clientProps); | |
// Get or create the Container | |
const container = yourCodeThatCreatesOrLoadsAContainer(client); | |
// Initialize Devtools passing the same logger as above and the container(s) you want it to expose | |
initializeDevtools({ | |
logger, | |
initialContainers: [ | |
{ | |
container, | |
containerKey: "My Container", | |
}, | |
], | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment