[docs] Clarify TypeScript AppHost appsettings behavior - #1609
[docs] Clarify TypeScript AppHost appsettings behavior#1609David Pine (IEvangelist) wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new aside text can mislead readers into thinking guest appsettings.json can override CLI-managed JSON-RPC server logging defaults, which should be clarified to match actual server configuration separation.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR refines the TypeScript AppHost documentation around appsettings.json by clarifying ownership (developer adds files, Aspire loads them, AppHost reads effective values) and making environment selection/precedence more explicit, including how Development/Production overrides map to CLI usage.
Changes:
- Refines the introductory description of how
appsettings.jsonis loaded and consumed fromapphost.mts. - Clarifies how to activate
appsettings.{Environment}.jsonviaaspire start --environment ...and documents environment precedence. - Expands the note to distinguish inner AppHost configuration from the CLI-managed JSON-RPC server configuration.
File summaries
| File | Description |
|---|---|
| src/frontend/src/content/docs/app-host/typescript-apphost.mdx | Clarifies TypeScript AppHost appsettings loading, environment overrides, precedence, and separation from the CLI-managed server. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Aspire looks for `appsettings.json` and `appsettings.{Environment}.json` in the same directory as `apphost.mts`. If more than one mechanism sets the active environment, `--environment` takes precedence over `DOTNET_ENVIRONMENT` and `ASPIRE_ENVIRONMENT`. Environment variables and command-line arguments take precedence over both JSON files, so you can override settings at run time without editing JSON. | ||
| Aspire looks for `appsettings.json` and `appsettings.{Environment}.json` in the same directory as `apphost.mts`. If more than one mechanism sets the active environment, Aspire applies this precedence: `--environment`, `DOTNET_ENVIRONMENT`, then `ASPIRE_ENVIRONMENT`. Environment variables and command-line arguments take precedence over both JSON files, so you can override settings at run time without editing JSON. | ||
|
|
||
| These files configure the inner AppHost, not the CLI-managed JSON-RPC server. They don't replace the server's private ATS assembly discovery or logging configuration. The inner AppHost separately retains the managed server's logging defaults as fallbacks, which the AppHost configuration can override. |
Summary
Follow-up to #1597 that addresses the remaining review feedback for TypeScript AppHost
appsettings.jsondocumentation:Third-party links and affiliations
None.
Validation
git diff --check/app-host/typescript-apphost/with the existing Astro development server: HTTP 200, all revised content assertions passed, and the browser console reported 0 errorsupstream/release/13.6version