-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonitor.html
45 lines (41 loc) · 1.31 KB
/
monitor.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<html>
<body>
<script src="https://d3irfuxwybyrt2.cloudfront.net/ekko-client-v2.2.6.js"></script>
<script>
const appName = "lt";
const host =
"http://ekko-ekkos-1QZ0F5RQERLFR-1436539638.us-east-1.elb.amazonaws.com";
const jwt =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZG1pbiI6dHJ1ZSwiYXBwTmFtZSI6Imx0IiwiaWF0IjoxNjIxNjAzMTI4fQ.2GdhLVJ9_h-dso0486JXKyN681M2Kg8PpY4dgQIdb1w";
const ekko = new Ekko({
appName,
host,
jwt,
uuid: sessionStorage.getItem("uuid") || "",
});
// const appName = "lt3";
// const host =
// "localhost";
// const jwt =
// "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZG1pbiI6ZmFsc2UsImFwcE5hbWUiOiJsdDMiLCJpYXQiOjE2MjE1NDExODJ9.okj7LyqWf_jWKmn79YOdClC7jGJaTRgihVrF_GpESPU";
// const ekko = new Ekko({
// appName,
// host,
// jwt,
// uuid: sessionStorage.getItem("uuid") || "",
// });
ekko.subscribe({ channels: ["greeting"] });
ekko.addListener({
message: (e) => {
console.log(e);
},
status: (e) => {
console.log(e);
},
});
// setInterval(() => {
// ekko.publish({ channel: "greeting", message: { text: "hi" } });
// }, 2000);
</script>
</body>
</html>