Sequel-based session middleware for Rack 2.0 and above.
https://github.com/wardrop/sequel-sessions
gem install sequel-sessions
Simplest example using in-memory SQLite database:
use Rack::Session::Sequel, Sequel.sqlite
A more fleshed out example with multiple options:
db_connection = Sequel.connect(adapter: 'mysql', host: 'localhost', username: 'root', database: 'blog')
use Rack::Session::Sequel, db: db_connection, table_name: :user_sessions, :expire_after => 3600
Copyright © 2017 Tom Wardrop. Distributed under the MIT license.