mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-11-12 17:38:23 -05:00
9 lines
321 B
JavaScript
9 lines
321 B
JavaScript
window.serverLogsStream = {
|
|
start: (dotNetObject, serverId) => {
|
|
const logs = new EventSource(`http://localhost:8080/api/admin/servers/${serverId}/logs`, { withCredentials: true });
|
|
|
|
logs.onmessage = event => {
|
|
dotNetObject.invokeMethodAsync("ReceiveLog", event.data);
|
|
}
|
|
}
|
|
} |