Je veux utiliser le paquet {: redix, "~> 0.6.1"} hex dans mon application de chat et commencer dans l'arborescence de supervisionComment puis-je exécuter Redix dans l'arborescence de supervision dans l'application phoenix elixir chat et accéder à partir de différents modules
{:ok, conn} = Redix.start_link()
{:ok, conn} = Redix.start_link(host: "example.com", port: 5000)
{:ok, conn} = Redix.start_link("redis://localhost:6379/3", name: :redix)
Redix.command(conn, ["SET", "mykey", "foo"])
mais il donne l'erreur lorsque je tente de mettre le lien établir une connexion à processus enfant
children = [
# Start the Ecto repository
supervisor(PhoenixChat.Repo, []),
# Start the endpoint when the application starts
supervisor(PhoenixChat.Endpoint, []),
# Start your own worker by calling: PhoenixChat.Worker.start_link(arg1, arg2, arg3)
# worker(PhoenixChat.Worker, [arg1, arg2, arg3]),
supervisor(PhoenixChat.Presence, []),
#supervisor(Phoenix.PubSub.Redis, [:chat_pubsub, host: "127.0.0.1"])
]
Comment puis-je démarrer la connexion Redix et stocker des données à Redis?