UNPKG

@opentap/runner-client

Version:

This is the web client for the OpenTAP Runner.

80 lines (50 loc) 1.24 kB
# OpenTap Runner Client This is the web client for the OpenTAP Runner. ## Authors - [@OpenTAP.io](https://opentap.io/) ## How to install the client - For Angular < 11 or webpack < 5, use version < 2 - For Angular >= 11 or webpack >= 5, use version >= 2.x.x Install with npm ```bash npm install @opentap/runner-client ``` ## How to use the client ```typescript import { RunnerClient } from "@openTap/runner-client"; class client { runnerClient: RunnerClient; constructor() { this.runnerClient = new RunnerClient('<BASE_SUBJECT>', { servers: '<SERVER_ADDRESS>' }); // Always connect first this.runnerClient.connect() .then(() => console.log('CONNECTED')) .catch(err => console.log(err)); } getImages() { this.data = this.runnerClient?.getImages() .then(res => console.log(res)) .catch(error => console.error(error)); } } ``` ## How to build locally Clone the project ```bash ~ git clone https://github.com/opentap/runner-client-web.git ``` Go to the project directory ```bash ~ cd runner-client-web ``` Install dependencies ```bash npm install ``` Build the library ```bash npm run build ``` ## How to debug the project ## License [MIT](/LICENSE)