문제

I have a .exs script in my root directory that I want to be able to execute on the command line like elixir my_script.exs. My script was working before I initialized Mix in my project but now it does not work. I can see that Mix is placing the .beam files in the ebin/ directory but apparently my script is not looking in there.

What is the proper way to load custom modules into a .exs script?

도움이 되었습니까?

해결책

You can run script like: mix run my_script.exs

OR

mix compile
elixir -pa ebin/ my_script.exs 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top