0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 12:40:25 +00:00

Convert the web_server example to a release

Temporary mimetypes list here too.
This commit is contained in:
Loïc Hoguin 2013-09-09 16:10:58 +02:00
parent 8bb7c180ff
commit 6a90d00cee
8 changed files with 37 additions and 50 deletions

View file

@ -16,7 +16,12 @@ start(_Type, _Args) ->
{"/[...]", cowboy_static, [
{directory, {priv_dir, web_server, []}},
{dir_handler, directory_handler},
{mimetypes, {fun mimetypes:path_to_mimes/2, default}}
{mimetypes, [
{<<".html">>, [<<"text/html">>]},
{<<".txt">>, [<<"text/plain">>]},
{<<".mp4">>, [<<"video/mp4">>]},
{<<".ogv">>, [<<"video/ogg">>]}
]}
]}
]}
]),