Skip to content

Commit 85d2981

Browse files
Gourav DwivediGourav Dwivedi
authored andcommitted
Added logs
1 parent 9398244 commit 85d2981

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Samples/AspDotCore/WebApp/WebApp/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void ConfigureServices(IServiceCollection services)
3535
.AllowAnyMethod()
3636
.AllowAnyHeader()
3737
.AllowCredentials()
38-
.WithOrigins("http://localhost:8080");
38+
.WithOrigins("http://localhost:8080", "https://gourav-d.github.io");
3939
}));
4040

4141
//services.AddAuthentication()

src/js/components/logic/lib/app.signalr.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class SignalRApp {
3636
// const li = document.createElement("li");
3737
// li.textContent = `Connection lost due to error "${error}". Reconnecting.`;
3838
// document.getElementById("messagesList").appendChild(li);
39+
AppEvents.emit('Logger', `Connection lost due to error "${error}". Reconnecting.`);
3940
console.log('On Reconnecting...');
4041
});
4142

@@ -44,6 +45,7 @@ class SignalRApp {
4445
// const li = document.createElement("li");
4546
// li.textContent = `Connection reestablished. Connected.`;
4647
// document.getElementById("messagesList").appendChild(li);
48+
AppEvents.emit('Logger', `Connection reestablished. Connected`);
4749
console.log('On Reconnected...');
4850
});
4951

0 commit comments

Comments
 (0)