File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
web: bin/rails server -p 3000
2
2
webpack: bin/webpack-dev-server
3
3
worker: bundle exec sidekiq -e ${RACK_ENV:-development} -C config/sidekiq.yml
4
+ cable: ANYCABLE_DEPLOYMENT=true bundle exec anycable --server-command="anycable-go --host=localhost --port=3334"
Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ def sign_out_and_redirect
39
39
redirect_to url
40
40
end
41
41
42
+ def not_found
43
+ render plain : 'not found' , status : :not_found
44
+ end
45
+
42
46
before_action :require_dev_env , only : [ :login_as ]
43
47
def login_as
44
48
u = User . find ( params [ :id ] ) if params [ :id ]
Original file line number Diff line number Diff line change 14
14
root to : 'home#index' , constraints : -> ( req ) { req . format == :html || req . format == '*/*' }
15
15
end
16
16
17
- mount ActionCable . server => '/cable'
17
+ if ENV [ 'ACTION_CABLE_ADAPTER' ] != 'anycable' || ENV [ 'ANYCABLE_DEPLOYMENT' ]
18
+ mount ActionCable . server => '/cable'
19
+ else
20
+ get 'cable' , to : 'home#not_found'
21
+ end
18
22
19
23
namespace :api do
20
24
namespace :v1 do
You can’t perform that action at this time.
0 commit comments