-module(base_app). %% see erl -man application -behaviour(application). -export([start/2, stop/1]). %% This is the entry module for your application. It contains the %% start function and some other stuff. You identify this module %% using the 'mod' attribute in the .app file. %% The start function is called by the application controller. %% It normally returns {ok,Pid}, i.e. the same as gen_server and %% supervisor. Here, we simply call the start function in our supervisor. %% One can also return {ok, Pid, State}, where State is reused in stop(State). %% %% Type can be 'normal' or {takeover,FromNode}. If the 'start_phases' %% attribute is present in the .app file, Type can also be {failover,FromNode}. %% This is an odd compatibility thing. %% start(_Type, _Args) -> base_super:start_link(). %% We can also implement the function start_phase(Phase, Type, Args), %% but this function will only be called if the .app file contains a %% 'start_phases' attribute. See erl -man application for more details. %% See the application 'dist' for an example. %% Another function that could be implemented here is prep_stop(State), %% but it is optional. Omitting it will not cause your application to crash. %% If prep_stop(S) is implemented, it is called before shutting down the %% processes of your application. Typically, prep_stop/1 could make sure that %% ports are closed before servers needed for processing incoming messages %% are killed. %% stop(State) is called when the application has been terminated, and %% all processes are gone. The return value is ignored. stop(_S) -> ok.