Skip to content

Commit

Permalink
updates readme doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Florent-Bouisset committed Mar 8, 2024
1 parent d87dfd5 commit 877d39a
Show file tree
Hide file tree
Showing 5 changed files with 739 additions and 734 deletions.
6 changes: 4 additions & 2 deletions CLIENT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# RxPaired-client

## How to build RxPaired-client and what to do with it

To build it, you first need to install its dependencies.
Expand All @@ -9,7 +11,7 @@ Then in the root directory, open a terminal and type:
npm install
```

You have to create a `.npmrc` file in the root directory.
If not already done, you have to create a `.npmrc` file in the root directory.
You can base yourself on the `.npmrc.sample` file:

```sh
Expand Down Expand Up @@ -53,7 +55,7 @@ At last, you have two choices in how to deploy that script:

- Either you store it on an HTTP(S) server, in which case you'll have to
indicate its URI to the `RxPaired-inspector` (more information on that
in its directory: `./inspector`).
in `INSPECTOR.md`).

This is the recommended choice.
If you choose to go this way, the `RxPaired-inspector` will conveniently
Expand Down
71 changes: 71 additions & 0 deletions INSPECTOR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# RxPaired-inspector

## How to build and run it

To build it, you first need to install its dependencies.

To do that, make sure that you have `npm` installed and this repository cloned.
Then go to this directory on a terminal, and type:

```sh
npm install
```

If not already done, you have to create a `.npmrc` file in the root directory.
You can base yourself on the `.npmrc.sample` file:

```sh
# in root directory
cp .npmrc.sample .npmrc
```

In that new `.npmrc` file, you'll need to set two URLs:

1. `inspector_debugger_url`:

This will be the WebSocket address `RxPaired-server` is listening to for
`RxPaired-inspector` connections.

If you didn't start the `RxPaired-server` yet, you should first start doing this by
using `npm run serve --workspace=server`.

Note that the URL already present uses the default port used by the server. If your
server runs locally in the default config, you might not actually have to update it.

In most cases however, you might want to use HTTPS/WSS instead of the default HTTP/WS
(to make the `RxPaired-Client` runnable in HTTPS pages).
There, you might need to update this value to the actual HTTPS URL used.

2. `device_script_url`:

This is the URL the `RxPaired-Client` (the script that will be deployed to devices)
is available at.

You can leave this URL empty if you do not wish to serve that script though HTTP(S)
means.
In that case, you will have to copy/paste the content of that script into the HTML
page running on the device.

Once this is done, you can start building the `RxPaired-inspector`.

In your terminal, type:

```sh
npm run build:min --workspace="inspector"
```

You can now start using the `RxPaired-inspector`, you just need to serve both the
`inspector/index.html` and the newly generated `inspector/inspector.js` files.

You can do so easily by typing in a terminal:

```sh
npm run serve --workspace="inspector"
```

Multiple persons can even build and serve their own `RxPaired-inspector` while
debugging the same devices as long as the same `RxPaired-server` is used.

Though you might prefer the simplicity of just letting a "real" HTTP(S) server serve both
of those files instead. This way this build step does not need to be repeated for each
user.
Loading

0 comments on commit 877d39a

Please sign in to comment.