Spaces:
Sleeping
Sleeping
File size: 878 Bytes
9058afc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<!DOCTYPE html>
<html>
<head>
<title>Run Command</title>
</head>
<body>
<h1>Run Command</h1>
<button id="runCommand">Run Server Command</button>
<pre id="result"></pre>
<script>
document.getElementById('runCommand').addEventListener('click', () => {
fetch('https://your-backend-url.com/run-command/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
})
.then(response => response.json())
.then(data => {
document.getElementById('result').textContent = JSON.stringify(data, null, 2);
})
.catch(error => {
document.getElementById('result').textContent = 'Error: ' + error;
});
});
</script>
</body>
</html>
|