<!DOCTYPE html>
<html>
<head>
    <title>Live Weight Terminal</title>

    <style>
        body {
            background: black;
            color: lime;
            text-align: center;
            font-family: Arial;
        }
        .weight {
            font-size: 120px;
            margin-top: 100px;
        }
    </style>
</head>
<body>

<h1>LIVE WEIGHT</h1>

<div class="weight" id="weight">0</div>
KG

<script>
async function loadWeight() {
    try {
        let res = await fetch('/public/api/latest-weight');
        let data = await res.json();

        document.getElementById('weight').innerText = data.weight;
    } catch (e) {
        console.log("Error", e);
    }
}

// 0.5 sec refresh
setInterval(loadWeight, 500);
loadWeight();
</script>

</body>
</html><?php /**PATH /home/naowarin/scale.naowarinternational.my.id/resources/views/terminal.blade.php ENDPATH**/ ?>