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

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

问题描述

这个人似乎是试图做同样的事情,但他的问题的答案还不够清楚。我不是很熟悉设置套接字服务器,所以我还是有点迷失在这里。以前有人完成了吗?你如何旋转套接字服务器并保持运行?

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 命令。 py 脚本,在 0.0.0.0:9000 上运行。我正在使用Ubuntu,所以我做了一个upstart配置来保持它的生存。似乎在我的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天全站免登陆