Is it possible to fill pinia in server-side on nuxt 3 via nitro plugin (putting my code in /server/plugins) #2091
Unanswered
SuperIbm
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to use Server Storage in order to cache my data via
redis
https://nuxt.com/docs/guide/directory-structure/server#server-storage . But I do not know how to combinepinia
+nuxt
+axios
+nitro
plugin all together. The problem is that you are not able to useuseStorage()
out ofdefineEventHandler()
it means that you can't just useuseStorage()
in the pinia side.Also I tried to include
redis
directly https://github.com/redis/node-redis and https://github.com/luin/ioredis in order to cache data with my own solution, but it didn't work withNuxt 3
also.So the question is how to get data via nitro plugin using
pinia
in order to have possibility to cache data byredis
usinguseStorage()
. Or at least maybe someone can point me out how to cache my data withredis
usingpinia
forNuxt 3
.Beta Was this translation helpful? Give feedback.
All reactions