We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elixir 1.12.3 Phoenix 1.5.12 Vapor 0.10.0
I haven't dug into why this error is now happening but when configuring like the example here:
defmodule VaporExample.Config do use Vapor.Planner dotenv() config :db, env([ {:url, "DB_URL"}, {:name, "DB_NAME"}, {:pool_size, "DB_POOL_SIZE", default: 10, map: &String.to_integer/1}, ]) config :web, env([ {:port, "PORT", map: &String.to_integer/1}, ]) config :kafka, VaporExample.Kafka end defmodule VaporExample.Application do use Application def start(_type, _args) do config = Vapor.load!(VaporExample.Config) children = [ {VaporExampleWeb.Endpoint, config.web}, {VaporExample.Repo, config.db}, {VaporExample.Kafka, config.kafka}, ] opts = [strategy: :one_for_one, name: VaporExample.Supervisor] Supervisor.start_link(children, opts) end end
I get the following error:
(FunctionClauseError) no function clause matching in Keyword.get/3
Turns out, the issue is resolved by changing the children configuration lines to first convert to a Keyword List instead of a Map like so:
{VaporExampleWeb.Endpoint, Map.to_list(config.web)}, {VaporExample.Repo, Map.to_list(config.db)},
A solution might be adding a function like Vapor.load_list!() to load the config as a Keyword List. Thoughts?
Vapor.load_list!()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Elixir 1.12.3
Phoenix 1.5.12
Vapor 0.10.0
I haven't dug into why this error is now happening but when configuring like the example here:
I get the following error:
Turns out, the issue is resolved by changing the children configuration lines to first convert to a Keyword List instead of a Map like so:
A solution might be adding a function like
Vapor.load_list!()
to load the config as a Keyword List. Thoughts?The text was updated successfully, but these errors were encountered: