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
redishttps://nuxt.com/docs/guide/directory-structure/server#server-storage . But I do not know how to combinepinia+nuxt+axios+nitroplugin 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
redisdirectly 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 3also.So the question is how to get data via nitro plugin using
piniain order to have possibility to cache data byredisusinguseStorage(). Or at least maybe someone can point me out how to cache my data withredisusingpiniaforNuxt 3.Beta Was this translation helpful? Give feedback.
All reactions