Skip to content
This repository was archived by the owner on Jan 11, 2019. It is now read-only.

Latest commit

 

History

History
81 lines (47 loc) · 3.22 KB

README.md

File metadata and controls

81 lines (47 loc) · 3.22 KB

Setting up Realm Event Kit on the server

This is the iOS app of the EventBlank project. For an overview of the whole project head to the main readme.

Setting up a Realm Object Server

All Realm Event Kit client apps (iPhone, Android, web, etc.) connect to a Realm Object Server instance, that you run on your server, in order to provide real-time updates to the app users.

You can run the server locally on your mac during development or in a Linux virtual box and install the server Developer Edition from here for free. (You can also run the free version in production for your event.)

Requirements: Terminal, Node.js.

Steps to set up the server:

1) Download the Developer Edition by following the instructions here.

Start Realm Object Server by running the basic demo server from your console: ros start. This will create some files and folders to store your realms in the current directory.

2) Download and install Realm Studio

To administer the server you will need to install the Realm swiss-knife - Realm Studio.

Run Studio and use the default admin user (credentials are pre-filled) to connect to your locally running server.

3) Create two users with usernames:

  • eventblank-admin@host
  • eventblank@host

You should see them appear in the user list like so:

4) Make sure you have Node.js installed and open a Terminal within the server folder of this project.

Run npm install to install the app's dependencies.

Create some test data in the event file via the command below. Set delete to yes in case there is existing EventBlank data you want to purge. The amount parameter sets how much data the script should create:

node test-data.js 
  --host [YOUR_HOST] --port [YOUR_PORT] 
  --username eventblank-admin@host --password [PASSWORD] 
  --delete [yes|no]
  --amount [minimal|plenty]

5) Find the user id of your read-only user (eventblank@host) to use with the next command. The user id you find in the users list - it's alphanumeric id in the first column:

Then execute the following command to setup the user rights on the server:

node users-app.js 
  --host [YOUR_HOST] --port [YOUR_PORT] 
  --username eventblank-admin@host --password [PASSWORD] 
  --command readonly --to [READONLY_USER_ID]

Now the server and the users are all set.

As the next step you can setup and run one of the client apps. More info in the main readme.

Credits

License

Distributed under the Apache 2.0 license. See LICENSE for more information.

About

The names and logos for Realm are trademarks of Realm Inc.

We ❤️ open source software!

See our other open source projects, check out the Realm Academy, or say hi on twitter (@realm).