🚀 Pre-alpha state. A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc.
Move logic for serving the SinglePageApp and static files to a .NET Minimal API MapFallback(), simplifying the setup. The index.html is not read until the first request. However, there is still a small chance that the SinglePageApp may not be fully generated when accessing the WebApp, so additional measures have been taken to enhance stability.
Previously, a WebAppMiddleware was used to serve the SinglePageApp and static files, leading to several challenges. For instance, generating the Open API contract with NSwag as part of the normal API build was problematic since the static index.html was not yet generated. To work around this, a "dummy" index.html was checked into source control, and timers were implemented to detect file creation.
Checklist
[x] I have added a Label to the pull-request
[x] I have added tests, and done manual regression tests
[x] I have updated the documentation, if necessary
Summary & Motivation
Move logic for serving the SinglePageApp and static files to a .NET Minimal API
MapFallback()
, simplifying the setup. Theindex.html
is not read until the first request. However, there is still a small chance that the SinglePageApp may not be fully generated when accessing the WebApp, so additional measures have been taken to enhance stability.Previously, a
WebAppMiddleware
was used to serve the SinglePageApp and static files, leading to several challenges. For instance, generating the Open API contract with NSwag as part of the normal API build was problematic since the staticindex.html
was not yet generated. To work around this, a "dummy"index.html
was checked into source control, and timers were implemented to detect file creation.Checklist