Putting ASP.NET Core Web API and a Vue.js app together as a single unit
The integration that we will do in this section is not required for Vue.js to send a request to the ASP.NET Core but will give us some advantages. Our goal here is to host the backend and the frontend projects in a single app project. In return, the application can be published or built as a single unit.
There are official web application project templates. You may call them boilerplates in .NET 5 that scaffold an Angular application with an ASP.NET Core Web API and a React application with an ASP.NET Core Web API. You can check out the two project templates at the following links:
- Use the Angular project template with ASP.NET Core: https://docs.microsoft.com/en-us/aspnet/core/client-side/spa/angular?view=aspnetcore-5.0&tabs=visual-studio
- Use the React project template with ASP.NET Core: https://docs.microsoft.com/en-us/aspnet/core/client-side/spa/react?view=aspnetcore-5.0&tabs=visual-studio...