Connect to an Atlas App Services Backend - Node.js SDK
The App client is the interface to the Atlas App Services backend. It provides access to the authentication functionality, functions, and sync management.
Before You Begin
Access the App Client
To connect to the App Services backend from your client, you need to create a
configuration object. Then, pass
that configuration object to a Realm.App()
instance.
You must include the id
field and the App ID for your App Services App, which you can
find in the App Services UI.
// Initialize your App. const app = new Realm.App({ id: "<yourAppId>", });
Retrieve an Instance of the App Client
To retrieve an instance of the App Client from anywhere in your application, call Realm.App.getApp() and pass in your App ID.
const app = Realm.App.getApp("<yourAppId>");