uniapp-signalr
v8.0.0
Published
ASP.NET Core SignalR Client, Add Uniapp miniprogram support by Jimifish
Downloads
3
Readme
JavaScript and TypeScript clients for SignalR for ASP.NET Core and Azure SignalR Service.
Support Uniapp
Installation
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.
Example (Uniapp)
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"));