mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-09-19 19:12:52 -04: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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|