-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It works fine on the web, but I can't get it on the server #320
Comments
The module does not export server functions at the moment. You can use $fetch in the server route to call the Strapi API in the meantime. In the future we shall export useServerStrapi() |
@atinux as the module uses already |
One way is to proxy your API endpoint in Nuxt with |
I took a look at proxies but for now I didn't managed to find a working solution really. But masking API endpoint is rather a small part of the "issue". I think the main advantage of letting running the module also on the server is everything what one could do with data, validation and other stuff. I'm looking forward to |
@atinux with such strapi: {
cookieName: "user_jwt",
url: "/api/cms",
prefix: "",
},
routeRules: {
"/api/cms/**": {
proxy: {
to: `${process.env.STRAPI_URL}/api/**`,
},
},
}, I was able to proxy Strapi server to |
I have the same problem.
|
Ok. My error. I start my app in docker compose and i remember add
|
It works fine on the web, but I can't get it on the server
server/colors/[id].ts
export default defineEventHandler(async (event)=>{ const { find } = useStrapi4() return ''; })
500 useStrapi4 is not defined
The text was updated successfully, but these errors were encountered: