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