Book Image

Learning Node.js for Mobile Application Development

Book Image

Learning Node.js for Mobile Application Development

Overview of this book

Table of Contents (21 chapters)
Learning Node.js for Mobile Application Development
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
14
Creating an E-Commerce Application Using the Ionic Framework
Index

Connecting to MongoDB


In order to be able to interact with a MongoDB instance, we first need to be sure that our server is running it. Then, we can access it through the Mongo shell application. In Chapter 1, Setting Up Your Workspace, we covered in some detail how to install and get MongoDB running on your specific operating system. You should go through these steps if you have not done so already. Once you have verified that MongoDB is running, open the MongoDB shell for your operating system.

Linux and Mac OS X

Start a console and run the following:

mongo

Windows

Start your command prompt and run the following:

C:\mongodb\bin\mongo.exe

You will see a prompt starting with the > character. From here, we can issue commands to MongoDB interactively and read the resulting output.