mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00

The new example is called file_server and it's basically the same as web_server was. The name is clearer than the original, all examples being "Web servers". The new example is also tested and the test suite has been refactored a little.
23 lines
389 B
Erlang
23 lines
389 B
Erlang
%% Feel free to use, reuse and abuse the code in this file.
|
|
|
|
%% @private
|
|
-module(file_server_sup).
|
|
-behaviour(supervisor).
|
|
|
|
%% API.
|
|
-export([start_link/0]).
|
|
|
|
%% supervisor.
|
|
-export([init/1]).
|
|
|
|
%% API.
|
|
|
|
-spec start_link() -> {ok, pid()}.
|
|
start_link() ->
|
|
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
|
|
|
|
%% supervisor.
|
|
|
|
init([]) ->
|
|
Procs = [],
|
|
{ok, {{one_for_one, 10, 10}, Procs}}.
|