Docs Menu
Docs Home
/ / /
Mongoid

Quick Start - Sinatra

On this page

  • Overview

This guide shows you how to use Mongoid in a new Sinatra web application, connect to a MongoDB cluster hosted on MongoDB Atlas, and perform read and write operations on the data in your cluster.

To learn how to integrate Mongoid into an existing application, see the Add Mongoid to an Existing Application guide.

Tip

If you prefer to connect to MongoDB by using the Ruby driver without Mongoid, see the Ruby driver Quick Start guide.

Mongoid is an Object-Document Mapper (ODM) framework for MongoDB in Ruby. By using Mongoid, you can easily interact with your data and create flexible data models.

Sinatra is a domain-specific language (DSL) for creating web applications in Ruby. Sinatra applications are simple to set up and can provide faster request processing than other frameworks.

MongoDB Atlas is a fully managed cloud database service that hosts your MongoDB deployments. You can create your own free (no credit card required) MongoDB Atlas deployment by following the steps in this guide.

Follow the steps in this guide to create a sample Mongoid web application that connects to a MongoDB deployment.

Tip

Other Framework Tutorials

If you prefer to use Ruby on Rails 8 as your web framework, see the Quick Start - Ruby on Rails guide.

Back

Next Steps

On this page