From 31cabe0fb98b4c75cb088761ba5ad53dbd2285ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 14 Sep 2016 18:51:11 +0200 Subject: Use spaces in snippets in the guide --- doc/src/guide/listeners.asciidoc | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'doc/src/guide/listeners.asciidoc') diff --git a/doc/src/guide/listeners.asciidoc b/doc/src/guide/listeners.asciidoc index 577883b..901b922 100644 --- a/doc/src/guide/listeners.asciidoc +++ b/doc/src/guide/listeners.asciidoc @@ -28,14 +28,14 @@ on port 8080: [source,erlang] ---- start(_Type, _Args) -> - Dispatch = cowboy_router:compile([ - {'_', [{"/", hello_handler, []}]} - ]), - {ok, _} = cowboy:start_clear(my_http_listener, 100, - [{port, 8080}], - #{env => #{dispatch => Dispatch}} - ), - hello_erlang_sup:start_link(). + Dispatch = cowboy_router:compile([ + {'_', [{"/", hello_handler, []}]} + ]), + {ok, _} = cowboy:start_clear(my_http_listener, 100, + [{port, 8080}], + #{env => #{dispatch => Dispatch}} + ), + hello_erlang_sup:start_link(). ---- The xref:getting_started[Getting Started] chapter uses a @@ -72,18 +72,18 @@ used directly to setup a custom listener. [source,erlang] ---- start(_Type, _Args) -> - Dispatch = cowboy_router:compile([ - {'_', [{"/", hello_handler, []}]} - ]), - {ok, _} = cowboy:start_tls(my_http_listener, 100, - [ - {port, 8443}, - {certfile, "/path/to/certfile"}, - {keyfile, "/path/to/keyfile"} - ], - #{env => #{dispatch => Dispatch}} - ), - hello_erlang_sup:start_link(). + Dispatch = cowboy_router:compile([ + {'_', [{"/", hello_handler, []}]} + ]), + {ok, _} = cowboy:start_tls(my_http_listener, 100, + [ + {port, 8443}, + {certfile, "/path/to/certfile"}, + {keyfile, "/path/to/keyfile"} + ], + #{env => #{dispatch => Dispatch}} + ), + hello_erlang_sup:start_link(). ---- Clients connecting to Cowboy on the secure listener are -- cgit v1.2.3