ASP.NET Core SignalR Client, Add Uniapp miniprogram support by Jimifish
npm install uniapp-signalrJavaScript and TypeScript clients for SignalR for ASP.NET Core and Azure SignalR Service.
Support Uniapp
bash
npm install uniapp-signalr
or
yarn add uniapp-signalr
`
Usage
See the SignalR Documentation at learn.microsoft.com for documentation on the latest release. API Reference Documentation is also available on learn.microsoft.com.
For documentation on using this client with Azure SignalR Service and Azure Functions, see the SignalR Service serverless developer guide.
$3
`javascript
import * as signalR from "uniapp-signalr";
let connection = new signalR.HubConnectionBuilder()
.withUrl("/chat")
.build();
connection.on("send", data => {
console.log(data);
});
connection.start()
.then(() => connection.invoke("send", "Hello"));
``