I’m building a library that could be used as either a straight API – or could be supervised as an application such that it could cache values in :ets, etc.
Are there any good examples or recommended ways to cleanly support both paths?
I’d add a module with a child_spec which could be added to the user’s supervision tree. This way the user would be in full control of when and how to start your app’s process tree.