mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[ci skip] Steal ActionCable.server
mounting from routes template.
Mounting it as prescribed here:
0d1d50c2db/railties/lib/rails/generators/rails/app/templates/config/routes.rb (L5)
This commit is contained in:
parent
0d1d50c2db
commit
a381add01f
1 changed files with 2 additions and 2 deletions
|
@ -399,12 +399,12 @@ The above will start a cable server on port 28080. Remember to point your client
|
|||
|
||||
### In app
|
||||
|
||||
If you are using a threaded server like Puma or Thin, the current implementation of ActionCable can run side-along with your Rails application. For example, to listen for WebSocket requests on `/cable`, match requests on that path:
|
||||
If you are using a threaded server like Puma or Thin, the current implementation of ActionCable can run side-along with your Rails application. For example, to listen for WebSocket requests on `/cable`, mount the server at that path:
|
||||
|
||||
```ruby
|
||||
# config/routes.rb
|
||||
Example::Application.routes.draw do
|
||||
match "/cable", :to => ActionCable.server, via: [:get, :post]
|
||||
mount ActionCable.server => '/cable'
|
||||
end
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue