Skip to content

Commit

Permalink
(docs) Examples: Update collaborative-editors README file
Browse files Browse the repository at this point in the history
The README file has been updated with purpose, prerequisites and running section.

Fixes: 0xTheProDev#67

Signed-off-by: Lakshya Thakur lapstjup@gmail.com
  • Loading branch information
lakbychance committed Oct 4, 2021
1 parent 211c108 commit b2936d5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions examples/collaborative-editors/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Purpose

This example can help you get familiar with the API usage of `@otjs/firebase-ace` and `@otjs/firebase-monaco`.

## Prerequisites

If you followed the [installation](https://github.com/Progyan1997/Operational-Transformation#installation) steps successfully, you would have `lerna` and `yarn` installed globally.

Before running this example, it's necessary to build all the packages using `yarn build` in the root (Operational-Transformation) directory.

Also, the **_firebase.json_** in this directory has `database` entry where `rules` point to `".firebase/database.rules.json"` file which is not included with this repository. The user can add their own file with custom rules.

For development purpose, the following can be the content of this file :-

```
{
"rules":{
".read":true,
".write":true
}
}
```

## Running

The example doesn't need the user to be authenticated with **firebase** since it runs local **firebase-emulator** for development purposes.

- Run `yarn start` from the root of this directory to fire up both the emulator and the collaborative-editors UI (accessible at **localhost:8000**).
![Landing Page](../../.github/images/examples/collaborative-editors/LandingPage.png)

- Click on the editor you want to test and you will be redirected to it.
- Copy the url and paste it in a new tab to open another session.
- Start collaborating 🤝
![Firebase Monaco editor in action](../../.github/images/examples/collaborative-editors/FirebaseMonaco.png)

0 comments on commit b2936d5

Please sign in to comment.