Project

fr_cable

0.0
No commit activity in last 3 years
No release in over 3 years
Http rack based server middleware compable with fr-cable-server
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

FrCable ruby

It's http rake based middleware server impementation for fr-cable-server.

!!!WARNING!!! The project is at a very early stage of development, it can be used, but there is no guarantee that it works as you expect and that I will not abandon it tomorrow

Installation

Add this line to your application's Gemfile:

gem 'fr_cable'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install fr_cable

Add this line into you config/application.rb

config.middleware.use FrCable::Rack

Then touch app/channels/application_cable/channel.rb, that contain

class ApplicationCable::Channel < FrCable::Channel::Base

end

and app/channels/application_cable/connection.rb

class ApplicationCable::Connection < FrCable::Connection::Base

end

Usage

You can define channels like in action_cable gem.

app/channels/comment_channel.rb

class OrderChannel < ApplicationCable::Channel
  def receive message
    broadcast(params[:room], message)
  end
end

Run fr-cable-server dockerfile near of you app and you already can messaging through fr-cable-js-client npm package.

Contributing

No needed to contribute now

License

The gem is available as open source under the terms of the MIT License.