So if any client side storage like cookie
and any persistent database are not allowed to be used. How would you persist data from user input in a Node.js server? array
is not an option as users should only see their own input. I thought of using session
(express-session
), but it essentially uses cookies
correct?
Asked
Active
Viewed 2,299 times
0

shangsunset
- 1,585
- 4
- 22
- 38
1 Answers
0
You can probably use local storage.
This package seems interesting: node-localstorage

TGrif
- 5,725
- 9
- 31
- 52
-
hmm thanks but i dont think client side storage is an option. – shangsunset Dec 18 '16 at 19:18
-
Glad to help. So maybe storing data in a text file on the server? And you know, cookies are client side too... I suggest you to make your question more clear with some more explanations of what you try to achiev. – TGrif Dec 18 '16 at 19:36
-
thanks. I thought about using file but how would you keep a user's data associated to themselves? if user A types 'Hello A', only user A can see 'Hello A'. – shangsunset Dec 19 '16 at 02:25
-
You could use JSON to store and structure your data. Just a simple function may parse it and find your user. – TGrif Dec 19 '16 at 08:36