Reputation: 11
I'm new to sail's and node, I'm trying to create/maintain a session without user login. The user sends request to server and i'm trying to store the session by req.session.uid="some uniqueid"
, and when again the same user tries for another request i'm unable to get the session. For every request a new session id is coming(session is not persisting).
please help by posting the code or by referring to already existing code.
Upvotes: 1
Views: 408
Reputation: 1762
You should call req.session.save();
at the end to persist the data.
Upvotes: 2