cl-deck-builder2/ruby/config.ru

22 lines
693 B
Plaintext
Raw Permalink Normal View History

2024-01-21 02:35:35 -05:00
# Easiest way to run Sidekiq::Web.
# Run with "bundle exec rackup simple.ru"
require 'sidekiq'
# A Web process always runs as client, no need to configure server
Sidekiq.configure_client do |config|
config.redis = { :size => 1, url: 'redis://localhost:6379', namespace: 'psychiq' }
end
# In a multi-process deployment, all Web UI instances should share
# this secret key so they can all decode the encrypted browser cookies
# and provide a working session.
# Rails does this in /config/initializers/secret_token.rb
secret_key = SecureRandom.hex(32)
use Rack::Session::Cookie, secret: secret_key, same_site: true, max_age: 86400
require "sidekiq/web"
map '/psy' do
run Sidekiq::Web
end