Suppose I created a new app with mix new app.
Then I placed a new hello.exs file to the root with this code:
IO.puts("hello")
App.hello
When I run this with elixir hello.exs, I’m getting hello printed, followed by the error: (UndefinedFunctionError) function App.hello/0 is undefined (module App is not available)
Is there a way a make it available?
And how can I use modules declared in other .ex / .exs files from inside an .exs file?
If it is a one off thing, then mix run -e is probably the thing, if its something you do more often, especially if it becomes a part of your workflow, rather than just for debugging things, write a mix task that you then can run with mix your_app.your_task.