# @therms/rpc-telemetry-client

![rpc_logo.png](https://bitbucket.org/thermsio/rpc-server-ts/raw/a9f154178cbc69e9b821ed22fbe7bfec125cdf86/rpc_logo.png)

A _Remote Procedure Call_ framework for Javascript Node.js written in TS.

- JS/TS client (https://bitbucket.org/thermsio/rpc-client-ts)
- Android/Kotlin client (https://bitbucket.org/thermsio/rpc-client-kotlin)
- iOS/Swift client (https://bitbucket.org/thermsio/rpc-client-swift)

 ----------

This is the web UI for viewing RPC servers and RPC documentation that is served by a Telemetry Server 
from the `@therms/rpc-server` package.

### RPC Telemetry Server URL

This webapp needs to call endpoints that are served on the `@therms/rpc-server` telemetry server. In order for it 
to call those endpoints it needs the URL. 

When the project is built, it will optionally use an env var to hard-code the RPC telemetry server address into the bundle.

```bash
RPC_SERVER_URI=https://rpc.sandbox.therms.app/telemetry
```

A global variable should be set in the `index.html` file to the RPC telemetry server URL for example: 

```html
window.TELEMETRY_SERVER_URL = 'https://rpc.sandbox.therms.app/telemetry';
```

If there is not env URL then it will default to the base URL that the `index.html` page is served from. 

> Note: the UI provides a manual method of entering the RPC telemetry server URL and fetching info/docs from there.
