Skip to content

eole-repos/plug_session_redis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlugSessionRedis for Ruby rack (redis-store)

hex.pm version

The Redis Plug.Session adapter for the Phoenix framework with Rails redis-store session. Poolboy + Redis.

Usage

# mix.exs
def application do
  [applications: [..., :plug_session_redis]]
end

defp deps do
  [{:plug_session_redis, git: "https://github.com/rinosamakanata/plug_session_redis.git", branch: "master" }]
end

config.exs

config :plug_session_redis, :config,
  name: :redis_sessions,    # Can be anything you want, should be the same as `:table` config below
  pool: [size: 2, max_overflow: 5],
  redis: [host: '127.0.0.1', port: 6379]

endpoint.ex

plug Plug.Session,
  store: PlugSessionRedis.Store,
  key: "_session_id",           #
  table: :redis_sessions,       # Can be anything you want, should be same as `:name` config above

About

Session store in Redis for Elixir's plug for Ruby rack

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 100.0%