aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/guide
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-12-28 17:54:50 +0100
committerLoïc Hoguin <[email protected]>2016-12-28 17:54:50 +0100
commit5838a0c81a978377084b33fd086de10f9775f425 (patch)
tree34cab3c3fcfe9b59db716378d960630f5db64b53 /doc/src/guide
parentf7094ad78f6638d0e940a724fe5a857cc857155f (diff)
downloadcowboy-5838a0c81a978377084b33fd086de10f9775f425.tar.gz
cowboy-5838a0c81a978377084b33fd086de10f9775f425.tar.bz2
cowboy-5838a0c81a978377084b33fd086de10f9775f425.zip
Add templates as Erlang.mk plugin
Diffstat (limited to 'doc/src/guide')
-rw-r--r--doc/src/guide/getting_started.asciidoc11
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/src/guide/getting_started.asciidoc b/doc/src/guide/getting_started.asciidoc
index 74164be..7fb787d 100644
--- a/doc/src/guide/getting_started.asciidoc
+++ b/doc/src/guide/getting_started.asciidoc
@@ -71,10 +71,15 @@ PROJECT = hello_erlang
DEPS = cowboy
dep_cowboy_commit = master
+DEP_PLUGINS = cowboy
+
include erlang.mk
----
-If you run `make run` now, Cowboy will be included in the release
+We also tell the build system to load the plugins Cowboy provides.
+These include predefined templates that we will use soon.
+
+If you do `make run` now, Cowboy will be included in the release
and started automatically. This is not enough however, as Cowboy
doesn't do anything by default. We still need to tell Cowboy to
listen for connections.
@@ -119,7 +124,7 @@ HTTP handler.
Generate a handler from a template:
[source,bash]
-$ make new t=cowboy_http n=hello_handler
+$ make new t=cowboy.http n=hello_handler
Then, open the 'src/hello_handler.erl' file and modify
the `init/2` function like this to send a reply.
@@ -134,7 +139,7 @@ init(Req0, State) ->
{ok, Req, State}.
----
-What the above code does is send a `200 OK` reply, with the
+What the above code does is send a 200 OK reply, with the
Content-type header set to `text/plain` and the response
body set to `Hello Erlang!`.