b5
dev sp 2024-02-16 16:31:31 +00:00
parent 90a2fe8d9b
commit 10e2829ced
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
---
import Layout from "../../layouts/Layout.astro";
---
<Layout title="">
<main>
<div>
<section class="container mx-auto px-4">
<div>
<button onclick="getWeather();">Get Data</button>
</div>
</section>
</div>
</main>
</Layout>
<script is:inline>
function getWeather(){
fetch(`https://apisp.dev2.cicdhosting.com/_dedicated/dwd/runner/weather/openweathermap/`)
.then(data => data.json())
.then(data => {
console.log(data)
})
}
</script>