Installation
BoardStreams consists of a server-side and a client-side component.
Server (Perl)
The server-side library is a Mojolicious plugin. You need to have a Mojolicious server and a PostgreSQL database (postgresql server v9 and above) to use BoardStreams.
Installation:
      > cpanm BoardStreams
    Set-Up:
      my $pg = Mojo::Pg->new("postgresql://$db_user:$db_pass\@$db_host/$db_name");
      $app->plugin('BoardStreams', Pg => $pg);
    Client (JavaScript)
The client-side library is framework-agnostic, and runs on any modern browser. See https://metacpan.org/pod/BoardStreams for version compatibility between server and client components.
Installation:
Via npm:
      > npm install boardstreams@x.y.z
    Via CDN:
      <script src="https://unpkg.com/boardstreams@x.y.z"></script>
    Set-Up:
      import BoardStreams from 'boardstreams';              // only needed if installed from npm
      const BS = new BoardStreams('/ws');                   // if the websocket server is on the same host
      const BS = new BoardStreams('wss://example.com/ws');  // otherwise
      BS.connect();
    Browser
 While developing your BoardStreams site, it's worth disabling your browser's websocket reconnection delay. In Firefox, that's the network.websocket.delay-failed-reconnects setting in about:config.