File tree 1 file changed +16
-3
lines changed
1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 1
- # Mercure Hub: getting started
1
+ # Mercure-Hub: getting started
2
+
3
+ ## How to send data from Node.js to Mercure-Hub and receive them in the browser
4
+
5
+ You can find here some examples of Node.js code to send data to a Mercure-Hub server.
6
+
7
+ These examples are designed to run with a Stackhero Mercure-Hub service.
8
+ You'll more informations about Stackhero here:
9
+ - [ Mercure-Hub cloud] ( https://www.stackhero.io/en/services/Mercure-Hub/benefits )
10
+ - [ Mercure-Hub pricing] ( https://www.stackhero.io/en/services/Mercure-Hub/pricing )
11
+ - [ Mercure-Hub documentations] ( https://www.stackhero.io/en/services/Mercure-Hub/documentations )
12
+
13
+
14
+ ## How to use
2
15
3
16
![ Screenshot] ( ./screenshot.png )
4
17
@@ -7,14 +20,14 @@ First you have to create a Mercure Hub service on Stackhero.
7
20
In Stackhero's configuration, allow "anonymous subscribers" to let the client connect to topics without authentication.
8
21
9
22
10
- ## Front end
23
+ ### Front end
11
24
12
25
In ` frontend/susbcriber.html ` , fill the ` endpoint ` (domain name of Stackhero's service).
13
26
14
27
Then open the file ` susbcriber.html ` in your browser.
15
28
16
29
17
- ## Back end
30
+ ### Back end
18
31
19
32
Fill the configuration informations in ` backend/.env-example ` and rename the file to ` .env ` .
20
33
Then start the server with ` npm run start ` .
You can’t perform that action at this time.
0 commit comments