Skip to content

Instantly share code, notes, and snippets.

@michael-mckenna
Last active August 2, 2017 18:10
Show Gist options
  • Save michael-mckenna/0059eaf5093eddba2e4fdc7fb25a96f6 to your computer and use it in GitHub Desktop.
Save michael-mckenna/0059eaf5093eddba2e4fdc7fb25a96f6 to your computer and use it in GitHub Desktop.
Error: Sync feature not available
var express = require('express');
var app = express();
const Realm = require('realm');
// realm set up
const adminUser = Realm.Sync.User.adminUser('**');
var token = "***";
Realm.Sync.setAccessToken(token);
const AppointmentSchema = {
name: 'Appointment',
primaryKey: 'id',
properties: {
id: 'string',
phoneNumber: 'string',
message: 'string',
time: 'date',
reminderTime: {type: 'date', indexed: true}
}
};
const appointmentRealm = new Realm({
sync: { // error still happening here
user: adminUser,
url: "realm://***/appointments"
},
schema: [AppointmentSchema]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment