Skip to content

Instantly share code, notes, and snippets.

@alexvy86
Created May 15, 2024 20:05
Show Gist options
  • Save alexvy86/a9375b07ada3ea1d07d3cdbabb13465e to your computer and use it in GitHub Desktop.
Save alexvy86/a9375b07ada3ea1d07d3cdbabb13465e to your computer and use it in GitHub Desktop.
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