How to connect two web apps with each other? One has angular code and the other has node js deployed successfully

Akshata Purshottam Palsule 21 Reputation points
2022-07-07T13:47:12.527+00:00

Hello Community,

I have one web app service with angular code and other web app service with node js code deployed successfully the data is to be taken from azure cosmos db for mongo. So inshort its a MEAN application how should I connect two web apps to call node server in angular and viceversa.

I wanted to run my Angular i.e Frontend by hitting nodejs url

While changing baseapiurl it throws CORS error.

Can anyone help me in this as soon as possible.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,961 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andriy Bilous 11,821 Reputation points MVP Volunteer Moderator
    2022-07-08T14:33:57.897+00:00

    Hello @Akshata Purshottam Palsule

    Your case looks like 3-Tier Application architecture - Frontend -> Backend -> Database.
    The web and business tiers are stateless. The data tier should consist of a database.

    218959-image.png

    Multi-tier web application which is a front-end web application that calls API applications behind it. This reference architecture showcases how to use service endpoints for secure communications between app services in a multi-tier environment.

    218973-image.png

    The web app can securely connect to a backend database over a fully private connection. The public internet can't reach the database, which eliminates a common attack vector.

    218944-image.png

    You can configure CORS settings in your WebApp. Here is CORS Q&A answer that explains it

    218982-image.png


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.