结合python烧瓶和express.js
我有一个网站应用程序的网站build立在Python烧瓶。 现在我们要在一个页面中介绍实时聊天系统。 build议混合使用flask和express.js,或者只使用express.js来开发聊天页面,使用Flask来rest,或者我们有像python这样的可以和flask一起工作的express.js之类的框架吗?
在Python中,你可以使用
http://twistedmatrix.com/trac/
http://www.gevent.org/
http://eventlet.net/
看看这个
http://librelist.com/browser//flask/2010/9/1/flask-and websockets /
Twisted has huge support and lot of success projects are built based upon it.
gevent is light when compared to twisted.
尝试使用后端https://github.com/SocketTornadIO/SocketTornad.IO的 Socket.io这种方式,你保持你的服务器的Python一路。
如果将Node.js与python混合,也是可以的,但是你将有2台服务器运行起来。