feat: server function demo
This commit is contained in:
1 parent
0a351f1aa9
commit
91aa434001
3 files changed
+13
No files matched your search
@@ -0,0 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
const { data } = await useFetch('/api/pageview')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
Page view: {{ data.pageview }}
|
||||
</div>
|
||||
</template>
|
||||
@@ -8,6 +8,7 @@
|
||||
<span text-purple-500>Vitesse</span>
|
||||
</h1>
|
||||
<InputEntry />
|
||||
<PageView />
|
||||
<Footer />
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,3 @@
|
||||
let count = 0
|
||||
|
||||
export default () => ({ pageview: count++ })
|
||||
Reference in new issue
Block a user