aboutsummaryrefslogtreecommitdiffstats
path: root/templates/cowboy_loop_h.erl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/cowboy_loop_h.erl')
-rw-r--r--templates/cowboy_loop_h.erl18
1 files changed, 18 insertions, 0 deletions
diff --git a/templates/cowboy_loop_h.erl b/templates/cowboy_loop_h.erl
new file mode 100644
index 0000000..ce301c9
--- /dev/null
+++ b/templates/cowboy_loop_h.erl
@@ -0,0 +1,18 @@
+-module(template_name).
+-behaviour(cowboy_loop_handler).
+
+-export([init/3]).
+-export([info/3]).
+-export([terminate/3]).
+
+-record(state, {
+}).
+
+init(_, Req, _Opts) ->
+ {loop, Req, #state{}, 5000, hibernate}.
+
+info(_Info, Req, State) ->
+ {loop, Req, State, hibernate}.
+
+terminate(_Reason, _Req, _State) ->
+ ok.