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/static_world/src/static_world_app.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/static_world/src/static_world_app.erl')
-rw-r--r-- | examples/static_world/src/static_world_app.erl | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/examples/static_world/src/static_world_app.erl b/examples/static_world/src/static_world_app.erl deleted file mode 100644 index 4d194c7..0000000 --- a/examples/static_world/src/static_world_app.erl +++ /dev/null @@ -1,27 +0,0 @@ -%% Feel free to use, reuse and abuse the code in this file. - -%% @private --module(static_world_app). --behaviour(application). - -%% API. --export([start/2]). --export([stop/1]). - -%% API. - -start(_Type, _Args) -> - Dispatch = cowboy_router:compile([ - {'_', [ - {"/", cowboy_static, {priv_file, static_world, "index.html"}}, - {"/[...]", cowboy_static, {priv_dir, static_world, "", - [{mimetypes, cow_mimetypes, all}]}} - ]} - ]), - {ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [ - {env, [{dispatch, Dispatch}]} - ]), - static_world_sup:start_link(). - -stop(_State) -> - ok. |