-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
39 lines (36 loc) · 908 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Netlify + Nimbella</title>
<link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap"
rel="stylesheet"
/>
<style>
.content {
display: grid;
place-items: center;
font-family: 'Poppins', sans-serif;
}
h1 {
font-size: 5rem;
}
</style>
</head>
<body>
<div class="content">
<h1 id="message">Loading...</h1>
</div>
</body>
<script>
async function main() {
const greet = await fetch('/api/default/greet?name='); // specify a name, default is World
document.getElementById('message').innerHTML = (
await greet.json()
).message;
}
main().catch(e => console.log(e));
</script>
</html>