Using MongoDB in the cloud
Today, we have many options to work with MongoDB, from in-house services to hosting companies that provide Platform as a Service (PaaS) and Software as a Service (SaaS).
We will present a solution called Database as a Service (DbaaS) that provides database services for highly scalable web applications.
Here's a simple step-by-step process to start using a MongoDB instance with a cloud service:
- Go to https://www.compose.io/.
- Create your free account.
- On your dashboard panel, click on add Database.
- On the right-hand side, choose Sandbox Database.
- Name your database as
node-api
. - Add a user to your database.
- Go back to your database title, click on admin.
- Copy the connection string.
- The string connection looks like this:
mongodb://<user>:<password>@kahana.mongohq.com:10073/node-api. ...
Get Learning Single-page Web Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.