Created
October 6, 2024 11:58
-
-
Save paulweezydesign/77a7c10c5c8d98d13c19dd47602d3b6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Realm from 'realm'; | |
import { RealmApp } from './app'; | |
const appConfig = { | |
id: 'your-app-id', | |
timeout: 10000, | |
}; | |
const app = new RealmApp(appConfig); | |
const realmConfig = { | |
schema: [ | |
{ | |
name: 'User', | |
primaryKey: '_id', | |
properties: { | |
_id: 'objectId', | |
email: 'string', | |
password: 'string', | |
}, | |
}, | |
], | |
sync: { | |
user: app.currentUser, | |
partitionValue: 'your-partition-value', | |
}, | |
}; | |
const realm = new Realm(realmConfig); | |
export { app, realm }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment