elk/server/api/pageview.ts

8 lines
121 B
TypeScript

const startAt = Date.now()
let count = 0
export default defineEventHandler(() => ({
pageview: count++,
startAt,
}))