-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #564 from talkjs/chore/update-nodejs-example
Update Node.js tutorial
- Loading branch information
Showing
5 changed files
with
70 additions
and
88 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"users": [ | ||
{ | ||
"id": "1", | ||
"name": "Alice", | ||
"email": "[email protected]", | ||
"photoUrl": "https://talkjs.com/new-web/avatar-7.jpg", | ||
"role": "default", | ||
"welcomeMessage": "Hi 👋" | ||
}, | ||
{ | ||
"id": "2", | ||
"name": "Sebastian", | ||
"email": "[email protected]", | ||
"photoUrl": "https://talkjs.com/new-web/avatar-2.jpg", | ||
"role": "default", | ||
"welcomeMessage": "Hello there!" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,43 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<title>TalkJS Node JS Integration</title> | ||
<meta name="description" content=""> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
</head> | ||
|
||
<body> | ||
|
||
<meta name="description" content="" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
</head> | ||
|
||
<body> | ||
<script src="script.js" async defer></script> | ||
<script> | ||
(function (t, a, l, k, j, s) { | ||
s = a.createElement('script'); | ||
s.async = 1; | ||
s.src = "https://cdn.talkjs.com/talk.js"; | ||
a.head.appendChild(s); | ||
k = t.Promise; | ||
t.Talk = { | ||
v: 3, | ||
ready: { | ||
then: function (f) { | ||
if (k) return new k(function (r, e) { | ||
l.push([f, r, e]) | ||
}); | ||
l | ||
.push([f]) | ||
}, | ||
catch: function () { | ||
return k && new k() | ||
}, | ||
c: l | ||
} | ||
}; | ||
})(window, document, []); | ||
(function (t, a, l, k, j, s) { | ||
s = a.createElement("script"); | ||
s.async = 1; | ||
s.src = "https://cdn.talkjs.com/talk.js"; | ||
a.head.appendChild(s); | ||
k = t.Promise; | ||
t.Talk = { | ||
v: 3, | ||
ready: { | ||
then: function (f) { | ||
if (k) | ||
return new k(function (r, e) { | ||
l.push([f, r, e]); | ||
}); | ||
l.push([f]); | ||
}, | ||
catch: function () { | ||
return k && new k(); | ||
}, | ||
c: l, | ||
}, | ||
}; | ||
})(window, document, []); | ||
</script> | ||
<script src = "https://unpkg.com/axios/dist/axios.min.js"></script> | ||
<!-- container element in which TalkJS will display a chat UI --> | ||
<div id="talkjs-container" style="width: 90%; margin: 30px; height: 500px"> | ||
<i>Loading chat...</i> | ||
<i>Loading chat...</i> | ||
</div> | ||
</body> | ||
|
||
</html> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters