Managing Sessions in Node.js?


What is the best way to manage session variables in Node.js? Is there any library?

12/29/2014 10:38:27 AM

Accepted Answer

You can do that very easily using:

Other option is to use frameworks:

  • Express.js:

    It seems to be the most used node.js framework. Is like Sinatra for Ruby and runs on top of connect.

  • Geddy:

    If you want to do more complex WebApps, Geddy is the one you choose. Is like Rails for Ruby.

9/17/2010 9:55:57 PM

nodejs provides a basic http API. http is stateless, and ideas of sessions and session variables exist in framework/protocols build on top of http.

Take a look at or as examples of web frameworks built with node that provide sessions.

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow