Skip to content
New issue

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

Unable to follow directions and get basic working example #9

Closed
brainlid opened this issue Apr 17, 2017 · 3 comments
Closed

Unable to follow directions and get basic working example #9

brainlid opened this issue Apr 17, 2017 · 3 comments

Comments

@brainlid
Copy link

brainlid commented Apr 17, 2017

I'm very interested in your package. I have similar needs and started to build my own solution. I would prefer to use your package, however, I'm having trouble following how to actually use it.

The readme mentions:

Define your configuration in config.ex of your application.

I'm not sure if that's a typo (config.exs) or if you are suggesting to create config.ex file that gets loaded by the application in a callback or something. If so, can you provide a sample?

I added the config example (even though I'm not using AMQP) to my config.exs file and tried playing with getting values throuh iex -S mix terminal.

This is what I get:

Confex.get(:core, AssetProcessor.AMQP.Producer)
[queue: [name: {:system, "OUT_QUEUE_NAME", "MyQueueOut"},
  error_name: {:system, "OUT_ERROR_QUEUE_NAME", "MyQueueOut.Errors"},
  routing_key: {:system, "OUT_ROUTING_KEY", ""},
  durable: {:system, "OUT_DURABLE", false},
  port: {:system, :integer, "OUT_PORT", 1234}]]

I expected values instead if the {:system, _, _} tuple. I get the same thing using Application.get_env.

Can you please point me to a guide, example, blog post, or something that shows how to get started with the library? I feel like I'm just missing some small but critical piece of information.

@ngeraedts
Copy link

The Readme file here has a typo for the given example. If you use Confex.get_map/2, it should parse the map below your application and key.

@brainlid
Copy link
Author

Got it. That helps. I've figured out how to work with the library now Thanks!

AndrewDryga added a commit that referenced this issue Apr 18, 2017
@AndrewDryga
Copy link
Member

@ngeraedts I guess I've fixed the typo, if there are any other typos - please, tell :).

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants