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.
npm install @portkey/socket
yarn add @portkey/socket
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 |
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));