try to see why sensor value doesnt show on website

This commit is contained in:
ishak jmilou.ishak
2024-12-18 12:22:22 +01:00
parent e5881f1b37
commit 61651a9a02
2 changed files with 3 additions and 7 deletions

View File

@@ -25,9 +25,12 @@ document.addEventListener("DOMContentLoaded", function() {
// Fetch data from the server
async function fetchData() {
try{
const response = await fetch("/data");
const data = await response.json();
return data;
} catch (error) {
console.error("Error:", error);
}
// Parse the data and show it on the website