rapport-progress
Adds mid-request progress updates to the Rapport websocket library.
Installation
Node: Install the plugin via NPM: npm install --save rapport-progress
Browser: Attach rapport.progress.min.js
to your HTML page
Then add the plugin to Rapport:
// GloballyRapport; // In Node.jsRapport; // In the browser // Or to a instance; // In Node.js; // In the browser
Standard Usage
This plugin adds mid-request progress updates to the rapport responder object. Simply add a listener when making a request:
const Rapport = ;const ws = Rapport; // On a client with promisesws; // On a client with callbacksws; // On the serverws
Usage with rapport-router and rapport-http
When using this plugin in conjunction with rapport-router or rapport-http, make sure you add the plugin to rapport AFTER adding those:
const rapport = ; // Rightconst rapport = ; // Wrong!
Once the plugin has been added, usage is similar to the standard usage, above:
// Server sideconst router = rapport;router;rapport; // Client side with promisesconst ws = rapport;ws ; // Client side with callbacksconst ws = rapport;ws ;