How to host website in NodeJS and MongoDB? And what will be the cost?

与世无争的帅哥 提交于 2019-12-12 07:17:47

问题


As new comer in NodeJS & Mongo DB, I don't know much about its hosting and pricing. Can I host website by self on own physical server/machine. Also is there any hosting website that provide facility to have both Node JS and MongoDb configured.


回答1:


Yes, yes and yes.

  1. You can host it yourself on your own machine but it will not be as easy and efficient as using a service for hosting, unless you have a high quality symmetric internet connection with low latency and high bandwidth.

  2. You can host it cheaply on a VPS using Digital Ocean, Vultr or AWS in which case you will have to configure Node and Mongo yourself.

  3. Or you can use managed platforms like Heroku for Node and Compose for Mongo in which case the price will be higher but everything will be taken care of for you.

It depends on what costs are you willing to take, both in terms of service fees and your time and expertise needed to configure and maintain different layers of the system.

As for "And what will be the cost?" - for number 1 it will be whatever your ISP is charging you. For number 2 it will be around $5 for Digital Ocean or Vultr per month with few months for free with promo links (Digital Ocean, Vultr) and with number 3 it's something like $25 for Heroku and about $30 for Compose per month. Of course there are other services available, those are just examples of the most popular ones.

See these answers for more info:

  • Deploy node.js in production
  • how to run node js on dedicated server?
  • NodeJS API with external deps in other language


来源:https://stackoverflow.com/questions/43005225/how-to-host-website-in-nodejs-and-mongodb-and-what-will-be-the-cost

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!