Reputation: 102
We have a web application which runs on .NET 8 (recently we migrated from 5 to 8). Now the team is planning to build new screens in ReactTS and merge these screens with the existing .NET 8 web application. So, it won't impact on the current customers. We also have a future plan to migrate the existing .NET web screens to React TS in phase wise manner
We are doing a POC with .NET Web App and ReactTS sample apps we tried different articles and approaches to run .NET application and ReactTS application on the Same domain and port number. Example .NET 8 web app is running on https://localhost:44341 and trying to run ReactTS also on same port and they both reside in same solution. Our sample code uploaded in github
Can we run MVC pages and ReactTS pages from same project ?
We have configured our program.cs file like
app.UseSpa(spa =>
{
spa.Options.SourcePath = "ClientApp";
spa.UseReactDevelopmentServer("start");
});
When we run the application react pages are loading but MVC pages are not loading. We are using
Microsoft.AspNetCore.SpaServices.Extensions
package.
We are trying to run .NET 8 and ReactTS so few screens will run on ReactTS and few screens will run on .NET 8 with same same domain and port
Upvotes: 0
Views: 36