MongoDB on Azure Web APP - node.js

I'm running nodejs application via Azure Web App. How do I set up MongoDB on Web App service?

You need to provision MongoDB yourself and have your Web App work against it.
Azure doesn't have a native MongoDB service but you can:
Use Azure's DocumentDB with the Mongo driver compatibility
Use the MongoDB VM image from the marketplace (this is IaaS).
Use mLab which is a 3rd party hosted solution but can be bought from Azure

Related

Is it possible to connect mongo db hosted in google cloud platform through a service account in node js?. If yes, how to do it?

Mongodb 3.2 is installed in a container natively in google cloud platform. we advised to connect node.js server to mongodb using a service account within google cloud platform. both server and db are hosted in google cloud platform.

How to migrate a web server and app server to azure?

If I have a 3-tier application on-premises and the three tiers are as follows: Web Server, App server, and DB server. Can I migrate the web and app server to Azure app services? or will I've to deploy the app server on another Azure service?
For an easy migration you could use an Azure Web App to host the sites you currently run with your on-premise Web Server.
Assuming your App Server should expose an API and is written in either .NET, PHP, Node.js, Java, or Python - you can deploy it using an Azure API App.
If you talking about SQL Server, use Azure SQL Database (Read SQL Server database migration to Azure SQL Database for potential limitations.
You can also consider to containerize your application and deploy it to Azure Kubernetes Services (AKS)

Azure SQL Server Database

We use SQL Sever as a Service in Azure cloud. Created WEB API and hosted on Azure Cloud under WEB APP. we are able to read from the DB using our WEB API, but unable to Write into DB using WEB API. any clue ? thanks

Running Mongodb CRUD API on azure (for Ionic)

I'm trying to run a MongoDB (using NodeJS and Express) on the Azure Server as a server side part of my ionic app.
Once placed on Azure I'd like to access it with my Ionic App using CRUD operations.
What steps do I go through after acquiring a Azure Portal account? Do I take Mobile Services or a simple Web Api?
Is there something specific that I need to add to the NodeJS server?
Generally, the app using Node and MongoDB as the backend for mobile client hosted on Azure App Service, such as WebApps, Mobile Apps (recommended).
Based on my understanding, I think there are some documents that may be helpful for you, please see them below.
For Web Apps, you can refer to the tutorial Get started with Node.js web apps in Azure App Service.
For Mobile Apps, I think your ionic app was based on cordova, there is a tutorial for getting started with cordova Create an Apache Cordova app. And Two related blogs shown a sample of Node + MongoDB on Azure for mobile, please see below.
Exposing MongoDB collections on the node.js backend
Querying MongoDB collections via the Azure Mobile Service node.js backend
To deploy the app to Azure App Service, you can try to publish it via FTP, git, or IDE like VS, please see https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/.
Hope it helps. Any concern, please feel free to let me know.

migrating from EC2 to Azure

First of all, I have never used Amazon EC2 neither Windows Azure. But I have a task to move application from EC2 to Azure. App is a REST api written in node.js. Currently I know that there is one EC2 instance with ubuntu with runing app on it. App is deployed to server/instance using tool called Capper. App uses some database and redis. This api is used by mobile clients.
My question is what is the simplest way to move app from EC2 to Azure and what type of service to use on Azure for hosting such app?
You will need to either deploy a Linux-based VM in Azure's "Virtual Machines". Check this article out for assistance: http://www.windowsazure.com/en-us/develop/nodejs/tutorials/getting-started/
Alternatively, you can deploy a node.js app on Windows Azure Websites, by adding a new "Web site" thru the management portal, and pick the node.js template from the gallery of predefined templates.
HTH

Resources