aboutsummaryrefslogtreecommitdiffstats
path: root/examples/static_world/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/static_world/src')
-rw-r--r--examples/static_world/src/static_world.erl15
-rw-r--r--examples/static_world/src/static_world_app.erl7
2 files changed, 6 insertions, 16 deletions
diff --git a/examples/static_world/src/static_world.erl b/examples/static_world/src/static_world.erl
deleted file mode 100644
index 2bed337..0000000
--- a/examples/static_world/src/static_world.erl
+++ /dev/null
@@ -1,15 +0,0 @@
-%% Feel free to use, reuse and abuse the code in this file.
-
--module(static_world).
-
-%% API.
--export([start/0]).
-
-%% API.
-
-start() ->
- ok = application:start(crypto),
- ok = application:start(cowlib),
- ok = application:start(ranch),
- ok = application:start(cowboy),
- ok = application:start(static_world).
diff --git a/examples/static_world/src/static_world_app.erl b/examples/static_world/src/static_world_app.erl
index 6470f12..4cc0254 100644
--- a/examples/static_world/src/static_world_app.erl
+++ b/examples/static_world/src/static_world_app.erl
@@ -15,7 +15,12 @@ start(_Type, _Args) ->
{'_', [
{"/[...]", cowboy_static, [
{directory, {priv_dir, static_world, []}},
- {mimetypes, {fun mimetypes:path_to_mimes/2, default}}
+ {mimetypes, [
+ {<<".html">>, [<<"text/html">>]},
+ {<<".txt">>, [<<"text/plain">>]},
+ {<<".mp4">>, [<<"video/mp4">>]},
+ {<<".ogv">>, [<<"video/ogg">>]}
+ ]}
]}
]}
]),