aboutsummaryrefslogtreecommitdiffstats
path: root/templates/cowboy_http_h.erl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/cowboy_http_h.erl')
-rw-r--r--templates/cowboy_http_h.erl19
1 files changed, 19 insertions, 0 deletions
diff --git a/templates/cowboy_http_h.erl b/templates/cowboy_http_h.erl
new file mode 100644
index 0000000..a2c3200
--- /dev/null
+++ b/templates/cowboy_http_h.erl
@@ -0,0 +1,19 @@
+-module(template_name).
+-behaviour(cowboy_http_handler).
+
+-export([init/3]).
+-export([handle/2]).
+-export([terminate/3]).
+
+-record(state, {
+}).
+
+init(_, Req, _Opts) ->
+ {ok, Req, #state{}}.
+
+handle(Req, State=#state{}) ->
+ {ok, Req2} = cowboy_req:reply(200, Req),
+ {ok, Req2, State}.
+
+terminate(_Reason, _Req, _State) ->
+ ok.