A practical guide on integrating an Angular frontend into a .NET Aspire Application Host for local development orchestration. Covers registering the Angular app using the AddNpmApp extension method, configuring environment variables via Aspire project references instead of hardcoded URLs, setting up an Angular proxy to forward API requests using those environment variables, and dynamically passing the port via the PORT environment variable. Also touches on observability benefits like traces and logs available through the Aspire dashboard out of the box.

6m read timeFrom timdeschryver.dev
Post cover image
Table of contents
.NET AspireAdding An Angular Project to .NET Aspire Application HostUsing environment variables in Angular for an easier project configurationConclusion
5 Impressions