The Application

We’re almost done. All we have to do now is write a file with the extension app that contains information about our application.

sellaprime.app
 
%% This is the application resource file (.app file) for the 'base'
 
%% application.
 
{application, sellaprime,
 
[{description, ​"The Prime Number Shop"​},
 
{vsn, ​"1.0"​},
 
{modules, [sellaprime_app, sellaprime_supervisor, area_server,
 
prime_server, lib_lin, lib_primes, my_alarm_handler]},
 
{registered,[area_server, prime_server, sellaprime_super]},
 
{applications, [kernel,stdlib]},
 
{mod, {sellaprime_app,[]}},
 
{start_phases, []}
 
]}.

Then we have to write a callback module with the same name as the mod file in the previous file. This file is derived by filling in the ...

Get Programming Erlang, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.