Goldfish

TODO: Add description

Installation

  1. If available in Hex, the package can be installed by adding goldfish to your list of dependencies in mix.exs:
def deps do
  [
    {:goldfish, "~> 0.1.0"}
  ]
end
  1. Edit your endpoint file (for example lib/my_app_web/endpoint.ex) and change store to use Goldfish.Store
plug Plug.Session,
  store: Goldfish.Store,
  key: "_my_app_key"
  1. Configure Goldfish (for example in config/config.exs) to use your repo of choice to store your user sessions
config :goldfish,
  repo: MyApp.Repo
  1. Generate the migration to create your session table and migrate your databse
mix goldfish

You should see this output

* creating priv/repo/migrations/20191224004432_goldfish_sessions.exs

Then migrate your database to create the table

mix ecto.migrate

That's it! You're ready to start using Goldfish to store your user sessions.

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/goldfish.