O'Reilly logo

OpenShift Cookbook by Shekhar Gulati

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

Enabling the MongoDB cartridge REST interface

MongoDB exposes a minimal REST interface that allows users to query collections. The interface does not expose operations to insert, update, or remove documents. In this recipe, you will learn how to enable the MongoDB cartridge REST interface.

Getting ready

To complete this recipe, you will need an application with a MongoDB cartridge. Refer to the Adding a MongoDB cartridge to your application recipe in this chapter to learn how to add one.

How to do it…

Perform the following steps to enable the MongoDB REST interface:

  1. Open a new command-line terminal and SSH into the myapp application gear using the ssh command:
    $ rhc ssh --app myapp
    
  2. Once inside the application gear, change the directory to mongodb/conf ...

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