This commit is contained in:
2026-04-17 21:36:56 +03:00
commit 7e776ea6e3
11 changed files with 643 additions and 0 deletions

24
src/eventhub_app.erl Normal file
View File

@@ -0,0 +1,24 @@
%% Основной модуль приложения
-module(eventhub_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
% Запускаем Mnesia
application:ensure_all_started(mnesia),
case infra_sup:start_link() of
{ok, Pid} ->
% Инициализируем таблицы и ждем готовности
ok = infra_mnesia:init_tables(),
ok = infra_mnesia:wait_for_tables(),
% Здесь позже запустим HTTP-сервер и другие сервисы
{ok, Pid};
Error ->
Error
end.
stop(_State) ->
ok.