feat: server logic for prerendering *idea*

This commit is contained in:
Ayo 2023-10-09 14:26:52 +02:00
parent ef2be56efd
commit bd751011f8

View file

@ -4,6 +4,10 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hello Nitro</title> <title>Hello Nitro</title>
<script setup>
// define logic that runs on the server
const name = "Ayo";
</script>
</head> </head>
<body> <body>
<a href="/about">About</a> <a href="/about">About</a>
@ -12,6 +16,7 @@
</div> </div>
<span>some text</span> <span>some text</span>
<clickable-text></clickable-text> <clickable-text></clickable-text>
<span>Name: {{ name }}</span>
<script> <script>
const helloWorld = document.querySelector("hello-world"); const helloWorld = document.querySelector("hello-world");
setTimeout(() => { setTimeout(() => {