I am trying to create a complete session managment in nodejs for logins, chat sessions etc. I googled a lot and every solution that i got was with some framework/module. I don't want to use any module/framework. I would rather like to build my own solution for this:
So this is the plan:
- I will set a session cookie on the client machine (yet to figure out how)
- For each cookie, i will be maintaining a unique id in the database instead of files as is the case with php (i am using mongodb)
- When a user opens the application, a cookie will be set, a entry will be made in database and corresponding information from the db will be fetched.
I am yet to lay a concrete plan for this. I wanted to know whether doing it this way is a good idea? i read somewhere....'Real men don't use any framework. They make everything on their own' :P
Please correct me if i am on a wrong direction. M just starting with these things....