在Node.js中管理会话? [英] Managing Sessions in Node.js?

查看:65
本文介绍了在Node.js中管理会话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Node.js中管理会话变量的最佳方法是什么?有图书馆吗?

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

推荐答案

您可以使用以下方法很容易地做到这一点:

You can do that very easily using:

  • Connect: http://senchalabs.github.com/connect/

Connects就像Ruby中的Rack.它为您提供了一个额外的层,您可以在其中播放"身份验证,会话,Cookie等.

Connects is like Rack in Ruby. It gives you an extra layer where you can "play" with authentication, sessions, cookies, among others.

其他选择是使用框架:

  • Express.js: http://expressjs.com/

这似乎是最常用的node.js框架.就像Sinatra for Ruby一样,并在connect之上运行.

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

Geddy: http://geddyjs.org/

Geddy: http://geddyjs.org/

如果您想做更复杂的WebApp,则可以选择Geddy.就像Rails for Ruby.

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

这篇关于在Node.js中管理会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆