add: data from MongoDB

Retrieve Data from MongoDB
This commit is contained in:
Fiona Lena Urban 2025-04-07 20:53:15 +02:00
parent 85e6035a9a
commit 987b685c41
10 changed files with 5361 additions and 41 deletions

View file

@ -0,0 +1,9 @@
export default defineEventHandler(async () => {
try {
return await ProductSchema.find()
} catch (error) {
console.error(error)
return []
}
})