That are commands you were supposed to enter into your terminal, but I assumed a linux environment. For windows I am not sure how to set an environment variable only for a single command, you might need to do it the hardway:
$ set MIX_ENV_OLD=%MIX_ENV%
$ set MIX_ENV=prod
$ mix app.tree
$ set MIX_ENV=dev
$ mix app.tree
$ set MIX_ENV=%MIX_ENV_OLD%
run these commands in a command prompt (Eingabeaufforderung) which is in the project folder of application.
But you are right, from the :observer-screen you posted, there is neither :hackney nor :httpoison started.
Out of curiosity, what’s wrong w/ how HTTPoison has set things up? I’ve been having the same problems with it, and would be willing to send them a PR, if I knew generally where to get started.
I’m not sure if I’d call it beeing the wrong way, but at least, its a not so common way in the BEAM world. If your app needs to have a proper supervision tree or workers set up, then do this in the application initialisation phase.
It is common sense that an app is not responsive until fully started and often one doesn’t care if it takes one or five seconds or even a minute until an application gets responsive. But if you need to check and perhaps start httpoison on first request that needs it, you might miss your response window.
The only way to ensure httpoison is started when needed is by starting it manually in your application start callback.
But BEAM has already the necessary tools to do this automatically, AFAIK all the guys at httpoison needs to do is to alter the application/0-function in the mixfile a bit:
def application do
[mod: {HTTPoison, []}, applications: [:hackney]]
end
Only by adding mod: {HTTPoison, []}, the BEAM does know that this is actually an application which needs to get started or that has a dependency that needs to be startet.