Skip to content

alexfilatov/guardian_db_redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

GuardianDb Redis Repo

Installation

  1. You need to add :redix and :jason to your project to make this Redis "Repo" working for your Guardian.DB

in your mix.exs file:

{:redix, ">= 0.0.0"},
{:jason, "~> 1.0"},

and create a config:

config :my_app, :redis,
  host: {:system, "REDIS_HOST"},
  port: {:system, "REDIS_PORT"}
  1. Create MyApp.Redix module in your lib/ directory. This is pool of Redix workers, just to be sure you'll not face GenServer bottleneck.

    Apart from that, don't forget to add MyApp.Redix to your application.ex file as a child to your Supervisor so it will be started when your project starts.

    children = [
      ...
      MyApp.Redix,
      ...
    ]
  1. Update your config/config.exs file with Guardian.DB config:
config :guardian, Guardian.DB,
  repo: Guardian.DB.Repo.Redis

You're done! Now your Guardian tokens are stored in Redis.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages