You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This is a simple example of a Mercure-Hub client in Node.js.
2
+
// This is not usual to connect from Node.js and you shouldn't probably using this code but use the example in "frontend" which will show you how to connect from a browser.
3
+
constEventSource=require('eventsource');
4
+
5
+
constendpoint='<XXXXXX>.stackhero-network.com';// PUT YOUR SERVER URL
6
+
7
+
// Caution: this is not your subscriber JWT defined in Stackhero's console.
8
+
// To get you subscriber JWS (with a final S, not T like in JWT), you have to generate it on the server side.
9
+
// An example is available in the `backend/subscriberJwsGenerator.js`
0 commit comments