Navigation

MongoDB Realm Node.js SDK

The MongoDB Realm Node.js SDK enables server-side client applications to access data stored in local realms and interact with MongoDB Realm services like Functions, MongoDB Data Access, and authentication. The Node.js SDK supports both JavaScript and TypeScript applications.

Note

The Node.js SDK does not support JavaScript or TypeScript applications written for web browsers. For that use case, you should consider the Web SDK. For development in React Native, refer to the React Native SDK documentation.

Installation

To learn how to add the MongoDB Realm Node.js SDK library as a dependency to your application, see Install Realm for Node.js.

Get Started

To get started quickly with some JavaScript or TypeScript code, see the Quick Start.

The Realm Data Model

You can store a wide variety of data within realms stored on your client. With Realm Sync, you can share updates to that data across clients and MongoDB Atlas.

For information about the structure of data you can store in realms, see Realms, Objects, and Relationships.

To learn about the results returned from realm queries, see Collections.

Work with Realm Database

Once you have defined a data model for your application, you need to be able to write and read pieces of data to and from your realms.

To learn how to query for data in local realms, see Query Engine.

For information about how to react to changes in realm data, see Notifications.

Work with MongoDB Realm

The Node.js SDK also connects your Realm client application with your Realm app’s backend services, including Functions, Services, Webhooks, Realm Sync, and built-in third-party authentication.

To learn how to connect to a MongoDB Realm app to call Functions, query data in an instance of MongoDB Atlas, and synchronize data in realms, see Call a Function.

To learn how to incorporate user authentication within your MongoDB Realm app, see Authentication.

To learn how to handle schema updates in your client application, see Migrations.