mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 04:10:24 +00:00
Fix websocket example
This commit is contained in:
parent
352cfce663
commit
a4fb56018e
2 changed files with 32 additions and 2 deletions
|
@ -17,8 +17,9 @@ start(_Type, _Args) ->
|
|||
{"/static/[...]", cowboy_static, {priv_dir, websocket, "static"}}
|
||||
]}
|
||||
]),
|
||||
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}],
|
||||
[{env, [{dispatch, Dispatch}]}]),
|
||||
{ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{
|
||||
env => #{dispatch => Dispatch}
|
||||
}),
|
||||
websocket_sup:start_link().
|
||||
|
||||
stop(_State) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue