Hi, I’m unsure how to form the title of the question (or the question overall) so I’m writing the best I can.
Until a bit ago I’ve only made Phoenix applications which didn’t have any separated functionalities per se outside of the app scope. Everything was in that Phoenix application.
Now I want to create an application which runs as a Discord bot independently but maybe at a later point use Phoenix with it. But instead of turning my Elixir app into a Phoenix application eventually, I’d like to create my Elixir app, put it on GitHub and then eventually use a completely new Phoenix app and call my Discord app as a hex dependency and run it under applications in mix.exs.
I have no clue how to google this properly nor find any info which seperated a normal elixir app than an api app (or how do I call it).
Do you want to have the bot in its own application supervision tree, single instance? Or do you want it to be used and started as a subtree in the “host” applications supervision tree?
If you want it to run its own tree you need a :mod entry, if you want it to be a subtree, you don’t need it.
I actually want to make it run independently but could as well run if if was a dependency (specified in mix.exs), so I added it as a :mod entry. I think it is the appropriate solution, but, if it’s not I’ll be sure to update this thread!