mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-11-09 16:08:21 -05:00
13 lines
362 B
JavaScript
13 lines
362 B
JavaScript
window.serverLogsStream = {
|
|
logs: "x",
|
|
|
|
start: (dotNetObject, serverId) => {
|
|
logs = new EventSource(`http://localhost:8080/api/admin/servers/${serverId}/logs`, { withCredentials: true });
|
|
|
|
logs.onmessage = event => {
|
|
dotNetObject.invokeMethodAsync("ReceiveLog", event.data);
|
|
}
|
|
},
|
|
|
|
stop: () => logs.close()
|
|
} |