What storage should i use?
In my application I have a page gateway where I am uploading data. Previously I was using a cookie (with pinia persistedstore), but I saw that the data ends up being very large and occupy the entire size available for the cookie.
I can't use data like clientside sessionStorage or localStorage because I show the information as soon as the page loads, without waiting for the client.
What can I use? I was thinking about using H3 sessions, but I couldn't figure out how to do it in a simple way (In my app I don't need authentication, all I need is a getter and setter for a big object that I can access from the server).
2 Replies
unstorage may be worth exploring.
unstorage - Universal Key-Value.
Unified key-value storage API with conventional features and 20+ built-in drivers.
Why not just lean on the built-in storage that Nitro provides in Nuxt? https://nuxt.com/docs/guide/directory-structure/server#server-storage
Nuxt
server/ · Nuxt Directory Structure
The server/ directory is used to register API and server handlers to your application.