🌈 🌤
摘要: 一、开发示例:首页点赞实时更新Redis 二、使用Daphne在Linux中部署 阅读全文
posted @ 2021-05-03 11:53 xiangjianan 阅读(491) 评论(0) 推荐(0)
摘要: 2.1 基本使用 官方推荐使用asgi服务器Daphne处理websocket请求 运行Daphne $ cd 项目目录 $ daphne -b 0.0.0.0 -p 8060 --proxy-headers 项目名.asgi:application 2.2 使用进程管理supervisor运行Da 阅读全文
posted @ 2021-05-03 11:46 xiangjianan 阅读(752) 评论(0) 推荐(0)
摘要: 1.1 安装 pip3 install channels pip3 install channels-redis pip3 install asgiref 1.2 后端核心代码 配置settings.py INSTALLED_APPS = [ ..., 'channels', ] # channel 阅读全文
posted @ 2021-05-03 11:43 xiangjianan 阅读(169) 评论(0) 推荐(0)