mirror of
https://github.com/arnaucube/comunicationLeap.git
synced 2026-02-07 11:26:43 +01:00
nodejs with express server, leapmotion for movement control, and threejs for 3d render
This commit is contained in:
33
node_modules/ws/examples/serverstats/public/index.html
generated
vendored
Normal file
33
node_modules/ws/examples/serverstats/public/index.html
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
font-family: Tahoma, Geneva, sans-serif;
|
||||
}
|
||||
|
||||
div {
|
||||
display: inline;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function updateStats(memuse) {
|
||||
document.getElementById('rss').innerHTML = memuse.rss;
|
||||
document.getElementById('heapTotal').innerHTML = memuse.heapTotal;
|
||||
document.getElementById('heapUsed').innerHTML = memuse.heapUsed;
|
||||
}
|
||||
|
||||
var host = window.document.location.host.replace(/:.*/, '');
|
||||
var ws = new WebSocket('ws://' + host + ':8080');
|
||||
ws.onmessage = function (event) {
|
||||
updateStats(JSON.parse(event.data));
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<strong>Server Stats</strong><br>
|
||||
RSS: <div id='rss'></div><br>
|
||||
Heap total: <div id='heapTotal'></div><br>
|
||||
Heap used: <div id='heapUsed'></div><br>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user