How to access useStrapi from server api folder?
I wish to use a composable (useStrapi from @Nuxtjs/strapi), but I get an error. Anyone have any idea on how I can do it?
2 Replies
So it appears that you are unable to do this, and you would have to use $fetch.
composables can only be used in setup functions or script setup. If you want to call strapi you will need to use something else and maybe implement the strapi client core package : https://www.npmjs.com/package/strapi-client-core. In your server utils