feat(#9): Nuxt 4 migration
This commit is contained in:
13
legalconsenthub/app/plugins/server-health.client.ts
Normal file
13
legalconsenthub/app/plugins/server-health.client.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export default defineNuxtPlugin(() => {
|
||||
// This plugin runs only on the client side to avoid issues with server-side rendering
|
||||
if (import.meta.client) {
|
||||
// Initialize server health monitoring as soon as the client is ready
|
||||
const { startPeriodicHealthCheck } = useServerHealth()
|
||||
|
||||
// Start the health check with a 1-minute interval
|
||||
// This ensures the health check starts even if app.vue's onMounted hasn't fired yet
|
||||
// nextTick(() => {
|
||||
// startPeriodicHealthCheck(60000)
|
||||
// })
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user