mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-04-23 13:13:32 -07:00
include web host for multiple multiworlds
This is in proof of concept stage, but also as a how-to as I get about monthly asked how to run multiple MultiServer instances for Discord Bots.
This commit is contained in:
34
WebHost/templates/host_multidata.html
Normal file
34
WebHost/templates/host_multidata.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Multiworld {{ filename }}</title>
|
||||
</head>
|
||||
<body>
|
||||
Hosting {{ filename }} at {{ name }}:{{ port }}
|
||||
<div id="logger"></div>
|
||||
<script>
|
||||
var xmlhttp = new XMLHttpRequest();
|
||||
var url = '{{ url_for('display_log', filename = filename) }}';
|
||||
|
||||
xmlhttp.onreadystatechange = function () {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
myFunction(this.responseText);
|
||||
}
|
||||
};
|
||||
|
||||
function request_new() {
|
||||
xmlhttp.open("GET", url, true);
|
||||
xmlhttp.send();
|
||||
}
|
||||
|
||||
|
||||
function myFunction(text) {
|
||||
document.getElementById("logger").innerText = text;
|
||||
}
|
||||
|
||||
request_new();
|
||||
window.setInterval(request_new, 3000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user