aboutsummaryrefslogtreecommitdiffstats
path: root/examples/websocket/src/websocket_app.erl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/websocket/src/websocket_app.erl')
-rw-r--r--examples/websocket/src/websocket_app.erl11
1 files changed, 2 insertions, 9 deletions
diff --git a/examples/websocket/src/websocket_app.erl b/examples/websocket/src/websocket_app.erl
index 1b9a421..5a37227 100644
--- a/examples/websocket/src/websocket_app.erl
+++ b/examples/websocket/src/websocket_app.erl
@@ -12,16 +12,9 @@
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
- {"/", cowboy_static, [
- {directory, {priv_dir, websocket, []}},
- {file, <<"index.html">>},
- {mimetypes, [{<<".html">>, [<<"text/html">>]}]}
- ]},
+ {"/", cowboy_static, {priv_file, websocket, "index.html"}},
{"/websocket", ws_handler, []},
- {"/static/[...]", cowboy_static, [
- {directory, {priv_dir, websocket, [<<"static">>]}},
- {mimetypes, [{<<".js">>, [<<"application/javascript">>]}]}
- ]}
+ {"/static/[...]", cowboy_static, {priv_dir, websocket, "static"}}
]}
]),
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}],