mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-11-13 18:08: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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|