npm.io
2.23.0-alpha.15 • Published 8 months ago

@portkey/socket

Licence
ISC
Version
2.23.0-alpha.15
Deps
2
Size
85 kB
Vulns
0
Weekly
0

@portkey/socket

ES Version Node Version NPM Package Version

It is already possible to follow the standard abp tutorial to add SignalR to your application. However, Portkey provides SignalR integration packages those simplify the integration and usage.

Installation

Using NPM

npm install @portkey/socket
Using Yarn
yarn add @portkey/socket

Prerequisites

Package.json Scripts

Script Description
clean Uses rm to remove dist/
build Uses tsc to build package and dependent packages
lint Uses eslint to lint package
lint:fix Uses eslint to check and fix any warnings
format Uses prettier to format the code

Basic Usage

import { DIDSignalr } from '@portkey/socket'

// new signalr instance
const didSignalr = new DIDSignalr();
// open link
didSignalr.doOpen({ url: 'your did signalr url', clientId: 'your clientId' });
// Scan code feedback
didSignalr.onScanLogin(({ body }) => console.log(body));