Interface with directus on the server in Nitro
genu opened this issue · 1 comments
genu commented
I haven't been able to find any mention of this, but is there a way to use this module on the server?
For example, I want if I want to create a api endpoint in Nuxt to be able to make some data modifications in directus, ideally I'd like to be able to do:
export default defineEventHandler(async () => {
const { updateItem } = useDirectusItems()
return true
})
But currently using any of the composable on the sever, throws errors:
[nuxt] [request error] [unhandled] [500] useDirectusItems is not defined
Is there a way to use this module on the server?
Intevel commented
Answered in the Discussion, currently not.