generated from dwd/boilarplate-astro-tailwind
change
This commit is contained in:
23
src/pages/tmp/weather.astro
Normal file
23
src/pages/tmp/weather.astro
Normal 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>
|
||||||
Reference in New Issue
Block a user