Update from main - #5
Merged
Merged
Conversation
Update config
Replicates the tracking setup from mongodb-developer/mean-stack-example: .devcontainer/track.sh plus postCreateCommand/postStartCommand hooks that best-effort report created/started events to the shared codespace-telemetry function. Appended with || true so telemetry can never break the dev environment.
Consolidate ConfigureServices/Configure into Program.cs using the .NET minimal hosting APIs, matching current ASP.NET Core convention.
Migrate to minimal hosting model, remove Startup.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the application's startup process to use the minimal hosting model introduced in newer versions of ASP.NET Core. It removes the legacy
Startup.csfile and consolidates all configuration and middleware setup intoProgram.cs. Additionally, it introduces a telemetry script that logs codespace lifecycle events for development containers.Key changes include:
Application Startup Refactor
Startup.csto the new minimal hosting model inProgram.cs, simplifying the application entry point and making use of modern ASP.NET Core conventions. (Program.cs[1]Startup.cs[2]Developer Experience & Telemetry
track.sh, to the.devcontainerfolder, which sends best-effort telemetry about codespace lifecycle events (such as creation and startup) without impacting developer workflow. (.devcontainer/track.sh.devcontainer/track.shR1-R9).devcontainer/devcontainer.jsonto invoke the telemetry script during post-create and post-start events, improving visibility into codespace usage. (.devcontainer/devcontainer.json.devcontainer/devcontainer.jsonL30-R31)