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

Convert the EventSource example to a release

This commit is contained in:
Loïc Hoguin 2013-09-08 11:48:48 +02:00
parent 6b7b0efd24
commit 49acfce8b9
7 changed files with 31 additions and 41 deletions

View file

@ -1,15 +0,0 @@
%% Feel free to use, reuse and abuse the code in this file.
-module(eventsource).
%% 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(eventsource).

View file

@ -17,7 +17,7 @@ start(_Type, _Args) ->
{"/", cowboy_static, [
{directory, {priv_dir, eventsource, []}},
{file, <<"index.html">>},
{mimetypes, {fun mimetypes:path_to_mimes/2, default}}
{mimetypes, [{<<".html">>, [<<"text/html">>]}]}
]}
]}
]),