Created
July 31, 2019 07:12
-
-
Save tocalai/dc86bc4fcf3b3c901519efebb18c4606 to your computer and use it in GitHub Desktop.
Demo how to use prefix using path base
This file contains 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
public void Configure (IApplicationBuilder app, IHostingEnvironment env) | |
{ | |
// [HMR] http://www.c-sharpcorner.com/article/using-hot-module-replacement-feature-of-webpack-in-asp-net-core/ | |
if (env.IsDevelopment ()) | |
{ | |
// ... | |
} | |
else | |
{ | |
app.UseExceptionHandler ("/Home/Error"); | |
} | |
// set base path just like concept of virtual directory | |
app.UsePathBase($"/{Configuration.Get<ConfigModel>().APIBaseInfo.BasePath}")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment