generated from dwd/boilarplate-astro-tailwind
change
parent
90a2fe8d9b
commit
10e2829ced
|
@ -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>
|
Loading…
Reference in New Issue