Bala Krishna
Bala Krishna

Reputation: 11

Session management in sails js framework

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

Answers (1)

SharpEdge
SharpEdge

Reputation: 1762

You should call req.session.save(); at the end to persist the data.

Upvotes: 2

Related Questions