Skip to content

Standalone ActionCable Javascript from Rails 5 for usage outside of Ruby on Rails (e.g. with ReactJS/Angular)

Notifications You must be signed in to change notification settings

mwalsher/actioncable-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project has been deprecated

This project is no longer being maintained, as the Rails team has published an official npm package.

actioncable-js

Standalone ActionCable Javascript from Rails 5 for usage outside of Ruby on Rails (e.g. with ES6/ES7 apps, React/Angular JS, etc.)

Usage

actioncable-js can be installed using npm:

npm install actioncable-js

And included in your ES6+ project with:

import { ActionCable } from 'actioncable-js';

Alternatively, simply include dist/action_cable.js in your project.

ActionCable documentation is available here.

Example

A simple HTML/JS example app is provided in examples/. Simply put examples/clock_channel.rb in your Rails 5 app, launch the Rails server, and open examples/clock_channel.html in your web browser. This app assumes that ActionCable is mounted at http://localhost:3000.

Updating

You can update and recompile action_cable.js by running ./update.sh.

License

actioncable-js is released under the MIT license:

http://www.opensource.org/licenses/MIT

About

Standalone ActionCable Javascript from Rails 5 for usage outside of Ruby on Rails (e.g. with ReactJS/Angular)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published