This file contains 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
const Realm = require('realm'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const SQLServerRealmLoader = require('realm-mssql-adapters').SQLServerRealmLoader; | |
const Config = require('./config'); | |
const Models = require('./realmmodels'); | |
if (process.env.NODE_ENV !== 'production') { | |
require('source-map-support').install(); |
This file contains 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
module.exports = { | |
// Database name | |
database_name: "<INSERT_PG_DATABASE_NAME>", | |
// Realm Object Server URL | |
//examples: | |
//self-hosted: "realm://10.0.0.7:9080" | |
//cloud: realms://small-plastic-handle.us1a.cloud.realm.io/ | |
realm_object_server_url: "realm://<IP_OR_DNS_OF_ROS>", | |
This file contains 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
const Realm = require('realm'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const PostgresAdapter = require('realm-postgres-adapters').PostgresAdapter; | |
const Config = require('./config'); | |
const Models = require('./realmmodels'); | |
async function main() { | |
//login as an admin user | |
var admin_user = await Realm.Sync.User.login(Config.auth_server_url, Config.admin_username, Config.admin_password) |
This file contains 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
const fs = require('fs'); | |
const path = require('path'); | |
const process = require('process'); | |
const SQLServerAdapter = require('realm-mssql-adapters').SQLServerAdapter; | |
const Config = require('./config'); | |
const Models = require('./realmmodels'); | |
// Print out uncaught exceptions | |
process.on('uncaughtException', (err) => console.log(err)); |
This file contains 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
const Realm = require('realm'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const SQLServerRealmLoader = require('realm-mssql-adapters').SQLServerRealmLoader; | |
const Config = require('./config'); | |
const Models = require('./realmmodels'); | |
if (process.env.NODE_ENV !== 'production') { | |
require('source-map-support').install(); |
This file contains 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
//Make sure to run via terminal: `npm install faker` | |
/** | |
* Script to initialize global config realm | |
*/ | |
const Realm = require('realm'); | |
const faker = require('faker') | |
/** | |
* Constants |