@etransfer/socket
v1.11.0-alpha.0
Published
![ES Version](https://img.shields.io/badge/ES-2020-yellow) ![Node Version](https://img.shields.io/badge/node-18.x-green) [![NPM Package Version][npm-image-version]][npm-url]
Downloads
1,998
Keywords
Readme
@etransfer/socket
It is already possible to follow the standard abp tutorial to add SignalR to your application. However, ETransfer provides SignalR integration packages those simplify the integration and usage.
Installation
Using NPM
npm install @etransfer/socket
Using Yarn
yarn add @etransfer/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 { NoticeSignalr } from '@etransfer/socket';
// new signalr instance
const noticeSignalr = new NoticeSignalr();
// open link
noticeSignalr.doOpen({ url: 'your signalr url' });
// listener
noticeSignalr.requestUserOrderRecord(({ body }) => console.log(body));