diff --git a/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-host.mdx b/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-host.mdx index 89c9d9bb7..d4a729940 100644 --- a/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-host.mdx +++ b/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-host.mdx @@ -65,15 +65,11 @@ This updates your `aspire.config.json` with the RavenDB hosting integration pack ```json title="aspire.config.json" ins={3} { "packages": { - "CommunityToolkit.Aspire.Hosting.RavenDB": "13.2.1-beta.532" + "CommunityToolkit.Aspire.Hosting.RavenDB": "13.4.0" } } ``` - - @@ -81,6 +77,9 @@ This updates your `aspire.config.json` with the RavenDB hosting integration pack Once you've installed the hosting integration in your AppHost project, you can add a RavenDB server resource and then add a database resource: + + + ```csharp title="AppHost.cs" var builder = DistributedApplication.CreateBuilder(args); @@ -94,6 +93,27 @@ builder.AddProject("apiservice") // After adding all resources, run the app... ``` + + + +```typescript title="apphost.mts" +import { createBuilder } from './.aspire/modules/aspire.mjs'; + +const builder = await createBuilder(); + +const ravenServer = await builder.addRavenDB("ravenServer"); +const ravendb = await ravenServer.addDatabase("ravendb"); + +const apiService = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj") + .withReference(ravendb) + .waitFor(ravendb); + +// After adding all resources, run the app... +``` + + + + 1. When Aspire adds a container image to the app host, as shown in the preceding example with the `docker.io/ravendb/ravendb` image, it creates a new RavenDB instance on your local machine. @@ -104,10 +124,12 @@ builder.AddProject("apiservice") -