Skip to content

Instantly share code, notes, and snippets.

Last active May 2, 2020
What would you like to do?
<script type="text/javascript" src=""></script>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function () {
var connection = new signalR.HubConnectionBuilder()
// Create a function that the hub can call to broadcast messages.
connection.on('newFirstLetterData', (name, message) => {
$("#reportOutput").append(`<div class="entry">${JSON.stringify(message)}</div>`);
.then(() => {
.catch((error) => {
alert("connection failed");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment