platformplatform / PlatformPlatform

Alpha state. A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc.
https://platformplatform.github.io
MIT License
253 stars 26 forks source link

Fix delay issue in serving SinglePageApp index.html on Windows #594

Closed BlueBasher closed 1 month ago

BlueBasher commented 1 month ago

Summary & Motivation

This PR resolves an issue where the backend experienced delays when serving the index.html file of a SinglePageApp. The delay occurred because the backend was waiting for the index.html file to regenerate before serving it, ensuring the file included references to newly generated JavaScript bundles. The logic now checks for updates using the LastWriteTime to confirm when the new file is ready.

The delay primarily affected Windows due to differences in how file timestamps are handled across operating systems. On Windows, the CreationTime doesn't update when a file is modified, unlike on MacOS where both CreationTime and LastWriteTime are updated. The fix ensures consistent behavior across platforms by relying on the LastWriteTime.

Atomic Changes

Checklist

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud