project / index.html
aassiiyAA123's picture
Upload 17 files
9058afc verified
raw
history blame contribute delete
878 Bytes
<!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>