diff options
author | Loïc Hoguin <[email protected]> | 2016-06-13 13:23:22 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-06-13 13:26:24 +0200 |
commit | 88227898edd26a823d0942fc7226adb61a20cb5d (patch) | |
tree | af1aeb41e7b92145b3be017cfdf18bf66f4a8e6e /examples/file_server/src/file_server_sup.erl | |
parent | 4293a40d9e922bc00f25d6c7e328f86e102275a0 (diff) | |
download | cowboy-88227898edd26a823d0942fc7226adb61a20cb5d.tar.gz cowboy-88227898edd26a823d0942fc7226adb61a20cb5d.tar.bz2 cowboy-88227898edd26a823d0942fc7226adb61a20cb5d.zip |
Merge static_world and web_server examples
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.
Diffstat (limited to 'examples/file_server/src/file_server_sup.erl')
-rw-r--r-- | examples/file_server/src/file_server_sup.erl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/file_server/src/file_server_sup.erl b/examples/file_server/src/file_server_sup.erl new file mode 100644 index 0000000..961eb5e --- /dev/null +++ b/examples/file_server/src/file_server_sup.erl @@ -0,0 +1,23 @@ +%% 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}}. |