The frontend of modern web applications consists mostly of static files. Therefore, pointing the server to the client directory and instructing it to serve its entire content as static files is a common practice. In such situations, you will also want to send the user the main application file, such as index.html, when they navigate to the static folder. These files are called default documents.
Defining default documents for a static folder is done via the UseDefaultFiles method. Within the Startup.cs file, locate the Configure method and add the following marked line:
app.UseDefaultFiles();app.UseStaticFiles();