Add redis gem

This commit is contained in:
icwizardmonke 2023-09-18 17:33:47 +00:00
parent f37d568ba0
commit 5770bb4f03
6 changed files with 10 additions and 2 deletions

View File

@ -2,6 +2,7 @@ source 'https://rubygems.org'
ruby '2.7.7'
gem 'rails', '5.2.2'
# TODO Upgrade sprockets
gem 'redis', '~> 4.0'
gem 'sprockets', '~> 3.7'
gem 'sass-rails' #, '~> 4.0.3'
gem 'uglifier' #, '>= 1.3.0'

View File

@ -326,6 +326,7 @@ GEM
execjs
railties (>= 3.2)
tilt
redis (4.8.1)
regexp_parser (2.1.1)
responders (3.0.1)
actionpack (>= 5.0)
@ -491,6 +492,7 @@ DEPENDENCIES
rbnacl (~> 3.4)
rbnacl-libsodium
react-rails
redis (~> 4.0)
rspec-rails
rubocop
sass-rails

File diff suppressed because one or more lines are too long

4
config/cable.yml Normal file
View File

@ -0,0 +1,4 @@
production:
adapter: redis
url: <%= ENV.fetch("REDIS_URL", "redis://localhost:6379/0") %>
channel_prefix: app_production

View File

@ -100,5 +100,6 @@ Rails.application.configure do
# config.action_controller.relative_url_root = '/13'
config.action_cable.allowed_request_origins =['my.tendy.zone'] # all origins in array will be allowed through
config.action_cable.disable_request_forgery_protection = true
config.cache_store = :redis_cache_store, { url: ENV.fetch("REDIS_URL", "redis://localhost:6379/0") }
end

View File

@ -21,7 +21,7 @@ class VideoCall extends React.Component{
join(data){ this.createPC(data.from, true) }
joinCall(e){
console.log("Hello from joinCall");
console.log(e);
// console.log(e);
App.cable.subscriptions.create(
{ channel: "CallChannel" },
{