I am able to write a program uisng expressjs. I have written the username and password ina json file and accessing when I get a request.
req.body.password == users[req.body.username].password)
I want to copy the sessionID (SID) created and send to the client. once I get a new request I want to check if it is there in local(inmemmory) if it is not there I want to send a different Error code to the user.
if(req.session.id=
My question is when not using redis (or) any DB, how can I store these session ID inmemory ? I understand if it is inmemory on Restart all the data is gone.
How can I do that ?
Don't use a session store, Express (Connect) defaults to memory session store.