Created
February 7, 2025 17:04
-
-
Save lovemycodesnippets/5fa0a54890787826afa1f70d13ce7fcd to your computer and use it in GitHub Desktop.
From the article "Building a Quiz App with Nuxt and Xata"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { getXataClient } from "~/src/xata"; | |
const xata = getXataClient(); | |
export default defineEventHandler(async (event) => { | |
const questions = await xata.db.questions.getMany(); | |
return questions; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment