Add kredis to your app with a default config
Used 14 times
J
Julian Rubisch
Usage
Run this command in your Rails app directory in the terminal:
rails app:template LOCATION="https://railsbytes.com/script/VD7s15"
Template Source
Review the code before running this template on your machine.
gem "kredis"
file "config/redis/shared.yml", <<~CODE
production: &production
host: <%= ENV.fetch("REDIS_SHARED_HOST", "127.0.0.1") %>
port: <%= ENV.fetch("REDIS_SHARED_PORT", "6379") %>
timeout: 1
development: &development
host: <%= ENV.fetch("REDIS_SHARED_HOST", "127.0.0.1") %>
port: <%= ENV.fetch("REDIS_SHARED_PORT", "6379") %>
timeout: 1
test:
<<: *development
CODE