This blog is moving to the Microsoft Azure Blog, more specifically in the Mobile area. Please update your links!
Azure Mobile Services has recently released the new Hybrid Connections feature that provides an easy and effective way to connect to on-premises resources from your mobile service, available for both Node.js and .NET backends.
One of the scenarios enabled by Hybrid Connections is utilizing a database hosted outside of Microsoft Azure from your Mobile Service and we have a step-by-step tutorial on how to set it up for apps that use the .NET backend. This post will help you get started with a Node.js backend.
All initial setup steps are the same as for the .NET backend, so please go ahead to that tutorial and go through steps 1 – 4:
Now that you’ve completed all setup steps, you’re ready to start writing some Node.js code that will connect to your on-premises resources. For example, this is a custom API script that will connect to an on-premises database.
As mentioned in the code comments, you will also need to specify your on-premises connection string as an app-setting in the Configure tab of your Mobile Service in the Azure Portal.
And that’s it! A few things to note in this example:
We hope this post will help you get started with Hybrid Connections in a Node.js Mobile Service. The main objective was to emphasize how simple it is to set it up and start using it, both from Node.js and .NET backends. We encourage you to play with the new feature and, as usual, to submit questions or comments to this post, the MSDN forums or contact us via Twitter @AzureMobile.