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:
parent
6b7b0efd24
commit
49acfce8b9
7 changed files with 31 additions and 41 deletions
|
@ -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).
|
|
@ -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">>]}]}
|
||||
]}
|
||||
]}
|
||||
]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue