How to deploy Angular 6 with .NET Core 2.0 Web API Application to Microsoft Azure?

一曲冷凌霜 提交于 2019-12-20 14:17:11

问题


How to deploy Angular 6 with .NET Core 2.0 Web API Application to Microsoft Azure?

I have created ASP.NET Core 2.0 Web API (Server-Side app) application and inside that created Angular 6.0 app (Client-Side app). Both apps are build and running successfully in a local environment (Database - MongoDB: mLab server).

Now, I want to deploy an angular app with .net core web API app to Azure environment in a single web app service (where client app and server app (web API) will serve).

However, I deployed an angular app (client-side) to the Azure environment but not with .net.


回答1:


I know you ask about how to deploy both the client and the server in a single API app but you should create two Azure Web Apps:

  1. An Azure API App that hosts your .NET core based Web API
  2. A Azure Web App that serves your Angular application (most likely only contains static files) and probably consumes your API app.

This will allow you to deploy e. g. a fix in the API without the need to redeploy your UI. This also won't add additional costs since you can host both apps in a single App Service plan and will simplify your CI / CD process.



来源:https://stackoverflow.com/questions/51041582/how-to-deploy-angular-6-with-net-core-2-0-web-api-application-to-microsoft-azur

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!