简体   繁体   中英

how to create a node.js server on an azure VM

I'm trying to create a VM on azure that will host a node.js web service. I can't seem to get it to work. Any help would be great (Can be windows or Linux machine but needs to be able to run mongoDB)

Edit:

Trying to create a scalable backend service for my phone app

The setup I am trying to accomplish is to create a mongodb such as this service offers with more than one node, and to create a web service which receives JSON data and stores/retrieves it into the DB

I could possibly use an existing project such as https://github.com/eaigner/DataKit to create a scalable backend service for my phone apps.

Steps I took are:

There are a few things you should try here:

  1. You should consider using an Azure website. It is a fully managed load balanced system similar to Heroku. Here is a tutorial about how to create one. That should be able to handle your incoming requests.

  2. The folks at Mongo created this tutorial on how to get set up with Azure. There is also the option of using a Mongo Add-On (Free) from the Azure store.

  3. Things deployed to azure will have a URL other than localhost 80. Check with your configuration to see what yours is. localhost usually refers to something deployed locally on your machine. You will need the IP of the site you've deployed.

Hope this helps!

I know it's kind of a little bit late to help the author but may be it will be useful for someone else. What helped me was this article: http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-install-mongodb-windows-server/

You need to create (if you don't have such rule) a new inbound rule as described here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM