# @fluid-example/example-driver This package contains simplified driver implementations used by Fluid examples in the FluidFramework repo. These may only be used in the examples, and are not intended for use in production scenarios. To use this package in an example, you must first integrate the `@fluid-example/example-webpack-integration` package as described in its README. Then follow these steps: 1. When constructing your driver, first call `getSpecifiedServiceFromWebpack()` to determine the requested service (one of `"t9s"`, `"odsp"`, or `"local"`). 2. Then call `createExampleDriver(service)` using the value obtained from 1. This will return an `ExampleDriver`. 3. Use the `ExampleDriver`'s `urlResolver` and `documentServiceFactory` directly in your calls to `createDetachedContainer()` and `loadExistingContainer()`. 4. Use the `ExampleDriver`'s `createCreateNewRequest(id)` to generate an `IRequest` for your `container.attach(request)` call. Provide it with a unique id. * If you are using the odsp service, the passed id will be used when loading the container in the future. Otherwise, inspect the `container.resolvedUrl.id` after attach has completed to discover the container id to use for loading. 5. Use the `ExampleDriver`'s `createLoadExistingRequest(id)` to generate an `IRequest` for your `loadExistingContainer()` call. Note that `createLoadExistingRequest` returns a `Promise` and must be `await`ed. See [GitHub](https://github.com/microsoft/FluidFramework) for more details on the Fluid Framework and packages within. ## Contribution Guidelines You can [contribute](https://github.com/microsoft/FluidFramework/blob/main/CONTRIBUTING.md) to Fluid Framework in these ways: - Answer questions in [GitHub Discussions](https://github.com/microsoft/FluidFramework/discussions). - [Submit bug reports](https://github.com/microsoft/FluidFramework/issues) and help verify fixes. - Review [source code changes](https://github.com/microsoft/FluidFramework/pulls). - [Contribute bug fixes](https://github.com/microsoft/FluidFramework/blob/main/CONTRIBUTING.md). For detailed instructions, read the [repo documentation](https://github.com/microsoft/FluidFramework/blob/main/docs/content/Home.md). This project follows the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, read the [Code of Conduct frequently asked questions](https://opensource.microsoft.com/codeofconduct/faq/). For questions or comments, contact . This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services. Use of these trademarks or logos must follow Microsoft’s [Trademark & Brand Guidelines](https://www.microsoft.com/trademarks). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. ## Help Read the [Fluid Framework documentation](https://fluidframework.com/docs/) for information about Fluid Framework concepts and APIs. To request information that the documentation does not contain, [create an issue](https://github.com/microsoft/FluidFramework/blob/main/docs/content/Contributing/Submitting-Bugs-and-Feature-Requests.md). ## Trademark This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services. Use of these trademarks or logos must follow Microsoft's [Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.