Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation about Action Cable npm package #24991

Merged
merged 1 commit into from Jun 29, 2016

Conversation

maclover7
Copy link
Contributor

Sorry, forgot to include in my main PR :(

[ci skip]

Jon Moss, Zach Schneider

cc @jeremy @javan

@maclover7
Copy link
Contributor Author

r? @jeremy

@@ -460,6 +460,28 @@ with all the popular application servers -- Unicorn, Puma and Passenger.
Action Cable does not work with WEBrick, because WEBrick does not support the
Rack socket hijacking API.

## npm usage

In addition to being available through the `actioncable` gem, Action Cable's frontend JS assets are also bundled in an officially supported npm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is too long

@maclover7
Copy link
Contributor Author

sorry for the delay @jeremy, updated 👍


In addition to being available through the `actioncable` gem, Action Cable's
frontend JS assets are also bundled in an officially supported npm module,
intended for usage in standalone frontends that communicate with a Rails application.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

frontend Applications

@maclover7
Copy link
Contributor Author

updated 👍

```javascript
ActionCable = require('actioncable')

cable = ActionCable.createConsumer('wss://RAILS-API-PATH.com/cable')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var cable

Sorry, forgot to include in my main PR :(

[ci skip]

[Jon Moss, Zach Schneider]
@maclover7
Copy link
Contributor Author

👍 we should push for global variables rather than instantiating consumers all over the place ;)

@vipulnsward
Copy link
Member

@maclover7 ideally one will instantiate and export them. There is no "global" per say in npm App, and its relative.

@maclover7
Copy link
Contributor Author

👍 yep, this is just meant to get people started

@vipulnsward
Copy link
Member

Getting this in for the release, since related changes are already in as part of #24991.
cc @rafaelfranca

@vipulnsward vipulnsward merged commit e5c5b6f into rails:master Jun 29, 2016
@maclover7 maclover7 deleted the actioncable-npm-docs branch June 30, 2016 00:16
eileencodes pushed a commit that referenced this pull request Jun 30, 2016
Add documentation about Action Cable npm package
eileencodes pushed a commit that referenced this pull request Jun 30, 2016
Add documentation about Action Cable npm package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants