Commits

Anonymous committed 92ce4bc

start webmachine_router gen_server under webmachine_sup, so apps can add routes at startup

  • Participants
  • Parent commits 4848159

Comments (0)

Files changed (1)

src/webmachine_sup.erl

 %% @spec init([]) -> SupervisorTree
 %% @doc supervisor callback.
 init([]) ->
-    Processes = [],
+    Router = {webmachine_router,
+              {webmachine_router, start_link, []},
+              permanent, 5000, worker, [webmachine_router]},
+    Processes = [Router],
     {ok, {{one_for_one, 9, 10}, Processes}}.