My Tasks
- {{ task.isCompleted ? '✅' : '❌' }} {{ task.text }}
Error: {{ error.message }}
{{ error }}
Don't have an account?
{{ error.message }}
``` -------------------------------- ### serverConvexAction Example Source: https://github.com/lupinum-dev/better-convex-nuxt/blob/main/docs/content/docs/5.server-side/1.server-routes.md Execute an action from server-side code. ```typescript import { api } from '~~/convex/_generated/api' export default defineEventHandler(async (event) => { const body = await readBody(event) const report = await serverConvexAction(event, api.reports.generate, { month: body.month, year: body.year, }) return report }) ``` -------------------------------- ### Debug Options Example Source: https://github.com/lupinum-dev/better-convex-nuxt/blob/main/docs/content/docs/6.advanced/7.module-config.md Example of configuring logging and debug options within the nuxt.config.ts file. ```typescript convex: { logging: 'info', debug: { authFlow: false, // Detailed auth flow logs (both client and server) clientAuthFlow: false, // Client-only auth flow trace serverAuthFlow: false, // Server-only auth flow trace }, } ``` -------------------------------- ### serverConvexMutation Example Source: https://github.com/lupinum-dev/better-convex-nuxt/blob/main/docs/content/docs/5.server-side/1.server-routes.md Execute a mutation from server-side code. ```typescript import { api } from '~~/convex/_generated/api' export default defineEventHandler(async (event) => { const body = await readBody(event) await serverConvexMutation(event, api.tasks.complete, { taskId: body.taskId }) return { success: true } }) ``` -------------------------------- ### Custom Subscription Example Source: https://github.com/lupinum-dev/better-convex-nuxt/blob/main/docs/content/docs/6.advanced/2.client-access.md Shows how to manually subscribe to updates and handle them with custom logic. ```vue ``` -------------------------------- ### serverConvexQuery Example Source: https://github.com/lupinum-dev/better-convex-nuxt/blob/main/docs/content/docs/5.server-side/1.server-routes.md Execute a one-off query from server-side code. ```typescript import { api } from '~~/convex/_generated/api' export default defineEventHandler(async (event) => { const posts = await serverConvexQuery(event, api.posts.list, { status: 'published' }) return posts }) ``` -------------------------------- ### Header with Auth States Example Source: https://github.com/lupinum-dev/better-convex-nuxt/blob/main/docs/content/docs/4.auth-security/1.authentication.md An example of a header component that dynamically displays navigation links based on the user's authentication state using Convex auth components. ```vueLoading...
Error loading tasks: {{ error.message }}
{{ task.text }}
Something went wrong
Loading...
Error: {{ error.message }}
Error: {{ error.message }}
{{ error?.message }}
Email sent!
```