Replies: 1 comment
-
The example To create a const { getSession, commitSession, destroySession } = createFileSessionStorage({
// The root directory where you want to store the files.
// Make sure it's writable!
dir: 'sessions',
cookie: sessionCookie,
}); Consider submitting a PR to update the documentation to use the above code. This would clarify things for future developers. I created a StackBlitz example. https://stackblitz.com/edit/remix-run-remix-dfi3rb ![]() |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hi.
I create a project where I need to store more then 4kb of data in cookie. Due to this reason I choose the file-backed sessions approach.
Following the documentation I use
createFileSessionStorage
however I have a feeling that there is something wrong with my setup.As I understood once the
createFileSessionStorage
is run is should create a file in/app/sessions
folder but in my case it does not happen.Can anyone share with my a very basic example of how to use a file-backed sessions approach?
Furthermore, we could add it later to official Remix examples.
Beta Was this translation helpful? Give feedback.
All reactions