Is it possible to include resource files when packaging my project using Mix/escript?

Hey!

That is precisely what the /priv folder is for in your project root. It’ll get packaged up along with your application when you build a release. If you have a data.xml file in your /priv directory you can get to it in your code by doing

Path.join(:code.priv_dir(:my_app), "data.xml")
13 Likes