O'Reilly logo

Learning Node.js for Mobile Application Development by Milorad Jevdjenic, Stefan Buttigieg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Connecting MongoDB and Node.js

We now have a solid understanding of the most basic concepts of how MongoDB works, and it is high time we put them to good work by integrating MongoDB with Node.js. In this section, we will cover this process step-by-step, and see how we can interact with the MongoDB databases directly from within a running Node.js instance.

Setting up a basic project

Before we start, please make sure that you have Node.js and Node Package Manager (NPM) installed on your system. Refer to Chapter 1, Setting Up Your Workspace, for the steps for your particular operating system.

Once you are set, start off by creating a basic project to experiment a bit with the MongoDB instance. Create a folder somewhere and call it MongoNode. Next, open ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required