async function startApp() { let date = moment().format("YYYY-MM-DD"); await printPage(date); } async function printPage(date){ // Print HTML let html = "alert.wpeckers.dynu.net"; html += "
To be continued.
\n"; document.getElementById('center').innerHTML = html; } async function fetchPrices(date) { let time = date === null ? moment() : moment(date, "YYYY-MM-DD"); console.log("Reading prices " + time + "..."); const response = await fetch("/prices/" + time.format("YYYY-MM-DD")); const data = await response.json(); console.log("==> fetchCurrentPrices: " + JSON.stringify(data)); return data; } function log(message) { console.log("INFO : " + message); }