Repository navigation
Document MongoDB single-node replica set mode in hosting integration guide - #1159
David Pine (IEvangelist) with Copilot wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the MongoDB hosting integration guide to document Aspire’s single-node replica set support, clarifying when and how to enable replica set mode and what connection/runtime behavior to expect.
Changes:
- Adds an “Enable replica set mode” section with guidance for transactions/change streams vs. standalone CRUD use.
- Adds C# and TypeScript AppHost examples showing how to enable replica set mode.
- Documents default replica set naming and provides a connection string example for replica set mode.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| `WithReplicaSet()` uses `rs0` as the default replica set name. In both C# and TypeScript, the optional replica set name argument is a string. Pass a name to override it, for example `WithReplicaSet("myset")`. |
| When replica set mode is enabled, the connection string your consuming app receives includes `directConnection=true`: | ||
|
|
||
| ```text title="Connection string example" | ||
| mongodb://admin:{mongo-password}@{mongo-host}:{mongo-port}/mongodb?authSource=admin&authMechanism=SCRAM-SHA-256&directConnection=true |
Remove the premature MongoDB replica set guidance because the hosting API has not merged or shipped. Co-authored-by: Copilot App <[email protected]>
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
| const horizontalWhitespace = String.raw`[ \t]+`; | ||
|
|
||
| // A deprecated term only matches when it isn't fused to an adjacent alphanumeric | ||
| // character, so longer tokens like `ASP.NET Aspire` or `.NET AspireX` stay intact |
There was a problem hiding this comment.
Use "Aspire" instead of ".NET Aspire".
| // character, so longer tokens like `ASP.NET Aspire` or `.NET AspireX` stay intact | |
| // character, so longer tokens like `ASPAspire` or `AspireX` stay intact |
| const termEnd = String.raw`(?![A-Za-z0-9])`; | ||
|
|
||
| // Markdown emphasis/link openers can sit between an article and a term in raw | ||
| // README content (e.g. `a **.NET Aspire**`, `a [.NET Aspire](url)`, or |
There was a problem hiding this comment.
Use "Aspire" instead of ".NET Aspire".
| // README content (e.g. `a **.NET Aspire**`, `a [.NET Aspire](url)`, or | |
| // README content (e.g. `a **Aspire**`, `a [Aspire](url)`, or |
|
|
||
| // Markdown emphasis/link openers can sit between an article and a term in raw | ||
| // README content (e.g. `a **.NET Aspire**`, `a [.NET Aspire](url)`, or | ||
| // `a _.NET Aspire_`), so the article corrector consumes them to stay grammatical |
There was a problem hiding this comment.
Use "Aspire" instead of ".NET Aspire".
| // `a _.NET Aspire_`), so the article corrector consumes them to stay grammatical | |
| // `a _Aspire_`), so the article corrector consumes them to stay grammatical |
| const markdownOpeners = String.raw`[*\[_]*`; | ||
|
|
||
| // Fenced code blocks and inline code spans are copied through verbatim so sample | ||
| // commands like `dotnet aspire run` are never rewritten into an unrunnable |
There was a problem hiding this comment.
Use "Aspire" instead of "dotnet aspire".
| // commands like `dotnet aspire run` are never rewritten into an unrunnable | |
| // commands like `Aspire run` are never rewritten into an unrunnable |
| * Case-insensitive regex source matching the deprecated term core, without | ||
| * boundaries. Use `${horizontalWhitespace}` for internal spaces; alphanumeric | ||
| * boundaries are applied automatically so a rule can never corrupt a longer | ||
| * token like `ASP.NET Aspire` or `.NET AspireX`. |
There was a problem hiding this comment.
Use "Aspire" instead of ".NET Aspire".
| * token like `ASP.NET Aspire` or `.NET AspireX`. | |
| * token like `ASPAspire` or `AspireX`. |
| /** | ||
| * Indefinite article the replacement should take. Set this only when the | ||
| * replacement's leading sound differs from the term's, so a preceding `a`/`an` | ||
| * is corrected (e.g. `a .NET Aspire` -> `an Aspire`). |
There was a problem hiding this comment.
Use "Aspire" instead of ".NET Aspire".
| * is corrected (e.g. `a .NET Aspire` -> `an Aspire`). | |
| * is corrected (e.g. `a Aspire` -> `an Aspire`). |
| seoTitle: Bun integration for Aspire AppHost (Community Toolkit) | ||
| description: Learn how to use the Aspire Community Toolkit Bun hosting integration to orchestrate Bun applications alongside other resources in the Aspire app host. | ||
| seoTitle: Bun integration for Aspire AppHost | ||
| description: Learn how to use the Aspire.Hosting.JavaScript Bun hosting APIs to orchestrate Bun applications alongside other resources in the Aspire app host. |
There was a problem hiding this comment.
Use "AppHost" instead of "app host".
| description: Learn how to use the Aspire.Hosting.JavaScript Bun hosting APIs to orchestrate Bun applications alongside other resources in the Aspire app host. | |
| description: Learn how to use the Aspire.Hosting.JavaScript Bun hosting APIs to orchestrate Bun applications alongside other resources in the Aspire AppHost. |
| ['uppercase article', `A ${legacyDotnetAspireName} sample`, 'An Aspire sample'], | ||
| ['lowercase article', `Build a ${legacyDotnetAspireName} sample`, 'Build an Aspire sample'], | ||
| ['no article', `Deploy the ${legacyDotnetAspireName} app`, 'Deploy the Aspire app'], | ||
| ])('normalizes the "dotnet aspire" spelling (%s)', (_scenario, input, expected) => { |
There was a problem hiding this comment.
Use "Aspire" instead of "dotnet aspire".
| ])('normalizes the "dotnet aspire" spelling (%s)', (_scenario, input, expected) => { | |
| ])('normalizes the "Aspire" spelling (%s)', (_scenario, input, expected) => { |
| test('normalizes prose while preserving adjacent code', () => { | ||
| const input = `Build a ${legacyAspireName} app, then run \`${legacyDotnetAspireName} run\`.`; | ||
| expect(normalizeAspireTerminology(input)).toBe( | ||
| 'Build an Aspire app, then run `dotnet aspire run`.' |
There was a problem hiding this comment.
Use "Aspire" instead of "dotnet aspire".
| 'Build an Aspire app, then run `dotnet aspire run`.' | |
| 'Build an Aspire app, then run `Aspire run`.' |
MongoDB replica set support is not shipped, so this PR intentionally contains no file changes. Co-authored-by: Copilot App <[email protected]>
c214bd4 to
1dde7ef
Compare
The MongoDB hosting docs did not cover the new single-node replica set support added in Aspire, leaving gaps for users who need transactions or change streams. This updates the MongoDB hosting integration page to explain when to enable replica set mode and what behavior changes to expect.
Replica set guidance and discoverability
API usage examples (copy/paste)
Connection and runtime behavior notes
WithReplicaSet()defaults tors0and accepts an optional string name override.directConnection=truewhen replica set mode is enabled.