添加Socket.IO对现有的Django / WSGI项目 [英] Adding Socket.IO to existing Django/WSGI project

查看:193
本文介绍了添加Socket.IO对现有的Django / WSGI项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<一个href=\"http://stackoverflow.com/questions/9840175/adding-django-socketio-to-existing-apache-mod-wsgi-django-site\">This小伙似乎试图做同样的事情,但回答他的问题不够清楚。我不是所有熟悉设立插槽服务器,所以我还是有点丢在这里。有没有人做到了这一点?你如何旋转起来套接字服务器,并保持它的运行?

This guy seems to be trying to do the same thing but the answer to his question isn't clear enough. I'm not all that familiar with setting up socket servers so I'm still a bit lost here. Has anyone accomplished this before? How do you spin up the socket server and keep it running?

我想对他的信息发表评论,并问他是否有成功,但我没有足够的声誉呢。

I wanted to comment on his post and ask him if he had success but I don't have enough reputation yet.

推荐答案

使用内置的 runserver_socketio 命令的 manage.py 的脚本,在 0.0.0.0:9000 。我使用Ubuntu的,所以我做了暴发户的配置让它活着。似乎是工作就好了一起跑步我的Apache / WSGI服务器。如果任何人有一个更好的解决方案,请说出来。

My final solution to this was using the built-in runserver_socketio command for the manage.py script, running on 0.0.0.0:9000. I'm using Ubuntu so I made an upstart config to keep it alive. Seems to be working just fine running alongside my Apache/WSGI server. If anyone has a better solution please speak up.

这篇关于添加Socket.IO对现有的Django / WSGI项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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