sharp / sharp_chat

One chat app based by Rails Action Cable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

  • Stroy1: 本方案是基于rails action cable组件实现,这块是rails做实时系统的标准方案,底层是基于websocket, 需要客户端的consumer发起websocket请求:https://localhost:3000/cable,从而服务器将用户的连接丢在相应的channel里面, 并且在这一步建了2个业务模型User和Message。相关代码:

https://github.com/sharp/sharp_chat/blob/master/app/channels/application_cable/chat_channel.rb https://github.com/sharp/sharp_chat/tree/master/app/models

About

One chat app based by Rails Action Cable


Languages

Language:Ruby 81.8%Language:HTML 13.1%Language:JavaScript 3.0%Language:CSS 2.1%