1
votes

I somehow need to get into Microsoft Azure Cloud. In our company we want to use Azure as a backend for our web and (hybrid) mobile apps. I want to start with a simple AngularJS app which connects to Azure and just shows some information from an Azure Database and/or from Azure Active Directory.

With this instruction I was able to connect a NodeJS app to an sql database lying in the Azure Cloud. But what I need is an AngularJS app connected to the database. It does not need to be a direct connection between both. I am new to stuff like Angular and Node. But what I read here is that a NodeJS app could be used as a layer between an AngularJS app and a database so that I can make API calls to NodeJS and receive a JSON with data from the database. How to achieve that?

I was able to deploy a simple text displaying NodeJS app on Azure Cloud. And I was able to build a NodeJS app locally which connected to the Azure Database. But how can I combine that?

2

2 Answers

1
votes

Your Angular app can call the Node API (which runs your custom code) as described in the article you are referencing. From your custom Node code you call SQL similar to the first article you reference and also similar to how they call MongoDB in other article.

0
votes

You can consider to implement the node.js application to connect to Azure SQL and expose RESTful APIs to your AngularJS frontend application. You can develop your application on local, and at last deploy to Azure Web Apps.

And additionally, you can combine the two tiers into a single application via Expressjs, you can refer to http://4dev.tech/2016/01/tutorial-integrating-angularjs-with-nodejs/ for more info.