1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
-module(main).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
%% Start Mnesia (or other children) here
io:format("Starting app...~n"),
%% Ensure Mnesia is started
mnesia:start(),
{ok, self()}.
stop(_State) ->
io:format("Stopping app...~n"),
ok.
%% setup() ->
%% mnesia:create_table(attributes, [{type, set},
%% {attributes, [name, value, type]},
%% {ram_copies, [node()]},
%% {index, [name]}
%% ]).
|