An application may be generated with a supervision tree to monitor processes. The supervision tree must be started and stopped with the application, and to do so, an application module callback must also be implemented. Mix provides a simple way to generate this type of application.
To generate an application with a supervision tree and an application module callback, we run
mix new supervised_app –-sup in the command line. This is shown in the following screenshot:
mix new task is invoked with the
–-sup option, although the generated application appears to be identical to the application ...