anchor.diff:  %% Application Interface
   %%-----------------------------------------------------------------------------
   start(_Type, _Args) ->
  -    PrivDir = get_priv_dir(),
  -    % external routes
  -    {ok, MasterUrlRoutePaths} = application:get_env(dderl, master_paths),
  -    UrlPathPrefix = ?URLSUFFIX,
  -    % default routes
  -    NewRoutePaths = MasterUrlRoutePaths ++
  -        [{UrlPathPrefix++"/", dderl, []},
  -         {UrlPathPrefix++"/ws", bullet_handler, [{handler, dderl_stream}]},
  -         {UrlPathPrefix++"/app/[...]", dderl_resource, []},
  -         {UrlPathPrefix++"/bullet.js", cowboy_static, {priv_file, bullet, "bullet.js"}},
  -         {UrlPathPrefix++"/[...]", cowboy_static, {dir, PrivDir}}],
  -    ok = application:set_env(dderl, master_paths, NewRoutePaths),
  -    ?Info("DDerl started with route paths ~p", [[P||{P,_,_}<-NewRoutePaths]]),
  -    Dispatch = cowboy_router:compile([{'_', NewRoutePaths}]),
  +    DDerlRoutes = get_routes(),
  +    Dispatch = cowboy_router:compile([{'_', DDerlRoutes}]),
  +    ?Info("Routes:~n~s~n---", [string:join([lists:flatten(
  +                                              io_lib:format("~p",[NRP]))
  +                                            ||NRP<-DDerlRoutes], "\n")]),    
   
       {ok, Ip}   = application:get_env(dderl, interface),
       {ok, Port} = application:get_env(dderl, port),
  
positive.code:     ?Info(lists:flatten(["URL https://",
                           if is_list(Ip) -> Ip;
                              true -> io_lib:format("~p",[Ip])
                           end, ":~p~s"]), [Port,UrlPathPrefix]),
      SupRef = dderl_sup:start_link(),
      ?Info("DDERL STARTED"),
      ?Info("---------------------------------------------------"),
  
negative.code:            https, [{middlewares, lists:reverse([LastMod, MwMod | RestMods])}
                     | Opts1]).
  
  -spec remove_mw(atom(), atom()) -> atom().
  remove_mw(Intf, MwMod) when is_atom(Intf), is_atom(MwMod) ->
      Opts = ranch:get_protocol_options(Intf),
      {value, {middlewares, Middlewares}, Opts1} = lists:keytake(middlewares,
                                                                 1, Opts),
      ok = ranch:set_protocol_options(
             https, [{middlewares, Middlewares -- [MwMod]} | Opts1]).
  
  -spec insert_routes(atom(), list()) -> ok.
  insert_routes(Intf, [{'_',[],Dispatch}]) ->
      Opts = ranch:get_protocol_options(Intf),
      {value, {env, [{dispatch,[{'_',[],OldDispatches}]}]}, Opts1}
      = lists:keytake(env, 1, Opts),
      ok = ranch:set_protocol_options(
             https, [{env, [{dispatch,[{'_',[],OldDispatches++Dispatch}]}]}
                     | Opts1]).
  
  
  -spec reset_routes(atom()) -> ok.
  reset_routes(Intf) ->
      Opts = ranch:get_protocol_options(Intf),
      {value, {env, [{dispatch,_}]}, Opts1} = lists:keytake(env, 1, Opts),
      [{'_',[],DefaultDispatches}] = cowboy_router:compile([{'_', get_routes()}]),
      ok = ranch:set_protocol_options(
             https, [{env, [{dispatch,[{'_',[],DefaultDispatches}]}]}
                     | Opts1]).
  
  %%-----------------------------------------------------------------------------
  
  %%-----------------------------------------------------------------------------
  %% Local Functions
  %%-----------------------------------------------------------------------------
  get_routes() ->
      PrivDir = get_priv_dir(),
      UrlPathPrefix = ?URLSUFFIX,
      [{UrlPathPrefix++"/", dderl, []},
       {UrlPathPrefix++"/ws", bullet_handler, [{handler, dderl_stream}]},
       {UrlPathPrefix++"/app/[...]", dderl_resource, []},
       {UrlPathPrefix++"/bullet.js", cowboy_static, {priv_file, bullet, "bullet.js"}},
       {UrlPathPrefix++"/[...]", cowboy_static, {dir, PrivDir}}].
  
  get_priv_dir() ->
      case code:priv_dir(?MODULE) of
          {error, bad_name} -> "priv";
  