@adaskothebeast/ngxs-signalr-plugin

Bind server SignalR events to Ngxs store actions.

Usage no npm install needed!

<script type="module">
  import adaskothebeastNgxsSignalrPlugin from 'https://cdn.skypack.dev/@adaskothebeast/ngxs-signalr-plugin';
</script>

README

NGXS SignalR Plugin

Bind server SignalR events to Ngxs store actions.

This library is build based on NGXS/WebSocket.

Instalation

npm install @adaskothebeast/ngxs-signalr-plugin --save

# or if you are using yarn
yarn add @adaskothebeast/ngxs-signalr-plugin --save

Configuration

If backend hub application is written in .net core.

import { NgxsModule } from '@ngxs/store';
import { NgxsSignalRPluginModule } from '@adaskothebeast/ngxs-signal-plugin';

@NgModule({
  imports: [
    NgxsModule.forRoot([]),
    NgxsSignalRPluginModule.forRoot({
      url: 'http://localhost:8080/hub'
    })
  ]
})
export class AppModule {}