aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorHerman Singh <[email protected]>2018-09-07 13:48:43 -0400
committerLoïc Hoguin <[email protected]>2018-09-23 14:12:38 +0200
commit86cb105679ff80214bfc9d979afa27b1eb747307 (patch)
tree873da2ab17c954c9fdf5e8adc5458212274b6c41 /examples
parent8045f7a998f03b8995d30dc14b3308e9a67422bc (diff)
downloadcowboy-86cb105679ff80214bfc9d979afa27b1eb747307.tar.gz
cowboy-86cb105679ff80214bfc9d979afa27b1eb747307.tar.bz2
cowboy-86cb105679ff80214bfc9d979afa27b1eb747307.zip
Rename handler modules to _h
Diffstat (limited to 'examples')
-rw-r--r--examples/chunked_hello_world/src/chunked_hello_world_app.erl2
-rw-r--r--examples/chunked_hello_world/src/toppage_h.erl (renamed from examples/chunked_hello_world/src/toppage_handler.erl)2
-rw-r--r--examples/compress_response/src/compress_response_app.erl2
-rw-r--r--examples/compress_response/src/toppage_h.erl (renamed from examples/compress_response/src/toppage_handler.erl)2
-rw-r--r--examples/cookie/src/cookie_app.erl2
-rw-r--r--examples/cookie/src/toppage_h.erl (renamed from examples/cookie/src/toppage_handler.erl)2
-rw-r--r--examples/echo_get/src/echo_get_app.erl2
-rw-r--r--examples/echo_get/src/toppage_h.erl (renamed from examples/echo_get/src/toppage_handler.erl)2
-rw-r--r--examples/echo_post/src/echo_post_app.erl2
-rw-r--r--examples/echo_post/src/toppage_h.erl (renamed from examples/echo_post/src/toppage_handler.erl)2
-rw-r--r--examples/eventsource/src/eventsource_app.erl2
-rw-r--r--examples/eventsource/src/eventsource_h.erl (renamed from examples/eventsource/src/eventsource_handler.erl)2
-rw-r--r--examples/file_server/src/directory_h.erl (renamed from examples/file_server/src/directory_handler.erl)2
-rw-r--r--examples/file_server/src/file_server_app.erl2
-rw-r--r--examples/hello_world/src/hello_world_app.erl2
-rw-r--r--examples/hello_world/src/toppage_h.erl (renamed from examples/hello_world/src/toppage_handler.erl)2
-rw-r--r--examples/rest_basic_auth/src/rest_basic_auth_app.erl2
-rw-r--r--examples/rest_basic_auth/src/toppage_h.erl (renamed from examples/rest_basic_auth/src/toppage_handler.erl)2
-rw-r--r--examples/rest_hello_world/src/rest_hello_world_app.erl2
-rw-r--r--examples/rest_hello_world/src/toppage_h.erl (renamed from examples/rest_hello_world/src/toppage_handler.erl)2
-rw-r--r--examples/rest_pastebin/src/rest_pastebin_app.erl2
-rw-r--r--examples/rest_pastebin/src/toppage_h.erl (renamed from examples/rest_pastebin/src/toppage_handler.erl)2
-rw-r--r--examples/ssl_hello_world/src/ssl_hello_world_app.erl2
-rw-r--r--examples/ssl_hello_world/src/toppage_h.erl (renamed from examples/ssl_hello_world/src/toppage_handler.erl)2
-rw-r--r--examples/upload/src/upload_app.erl2
-rw-r--r--examples/upload/src/upload_h.erl (renamed from examples/upload/src/upload_handler.erl)2
-rw-r--r--examples/websocket/src/websocket_app.erl2
-rw-r--r--examples/websocket/src/ws_h.erl (renamed from examples/websocket/src/ws_handler.erl)2
28 files changed, 28 insertions, 28 deletions
diff --git a/examples/chunked_hello_world/src/chunked_hello_world_app.erl b/examples/chunked_hello_world/src/chunked_hello_world_app.erl
index 20abf6e..9c6eb1d 100644
--- a/examples/chunked_hello_world/src/chunked_hello_world_app.erl
+++ b/examples/chunked_hello_world/src/chunked_hello_world_app.erl
@@ -13,7 +13,7 @@
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
- {"/", toppage_handler, []}
+ {"/", toppage_h, []}
]}
]),
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
diff --git a/examples/chunked_hello_world/src/toppage_handler.erl b/examples/chunked_hello_world/src/toppage_h.erl
index 3865698..7ed2964 100644
--- a/examples/chunked_hello_world/src/toppage_handler.erl
+++ b/examples/chunked_hello_world/src/toppage_h.erl
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
%% @doc Chunked hello world handler.
--module(toppage_handler).
+-module(toppage_h).
-export([init/2]).
diff --git a/examples/compress_response/src/compress_response_app.erl b/examples/compress_response/src/compress_response_app.erl
index c5fdbf6..b5cba52 100644
--- a/examples/compress_response/src/compress_response_app.erl
+++ b/examples/compress_response/src/compress_response_app.erl
@@ -13,7 +13,7 @@
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
- {"/", toppage_handler, []}
+ {"/", toppage_h, []}
]}
]),
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
diff --git a/examples/compress_response/src/toppage_handler.erl b/examples/compress_response/src/toppage_h.erl
index 67b8fea..477cfcf 100644
--- a/examples/compress_response/src/toppage_handler.erl
+++ b/examples/compress_response/src/toppage_h.erl
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
%% @doc Compress response handler.
--module(toppage_handler).
+-module(toppage_h).
-export([init/2]).
diff --git a/examples/cookie/src/cookie_app.erl b/examples/cookie/src/cookie_app.erl
index 8301d17..da086e2 100644
--- a/examples/cookie/src/cookie_app.erl
+++ b/examples/cookie/src/cookie_app.erl
@@ -13,7 +13,7 @@
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
- {'_', toppage_handler, []}
+ {'_', toppage_h, []}
]}
]),
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
diff --git a/examples/cookie/src/toppage_handler.erl b/examples/cookie/src/toppage_h.erl
index 38952ef..308899b 100644
--- a/examples/cookie/src/toppage_handler.erl
+++ b/examples/cookie/src/toppage_h.erl
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
%% @doc Cookie handler.
--module(toppage_handler).
+-module(toppage_h).
-export([init/2]).
diff --git a/examples/echo_get/src/echo_get_app.erl b/examples/echo_get/src/echo_get_app.erl
index 39fefd6..c2fd0df 100644
--- a/examples/echo_get/src/echo_get_app.erl
+++ b/examples/echo_get/src/echo_get_app.erl
@@ -13,7 +13,7 @@
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
- {"/", toppage_handler, []}
+ {"/", toppage_h, []}
]}
]),
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
diff --git a/examples/echo_get/src/toppage_handler.erl b/examples/echo_get/src/toppage_h.erl
index 280b5b0..419b4d4 100644
--- a/examples/echo_get/src/toppage_handler.erl
+++ b/examples/echo_get/src/toppage_h.erl
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
%% @doc GET echo handler.
--module(toppage_handler).
+-module(toppage_h).
-export([init/2]).
diff --git a/examples/echo_post/src/echo_post_app.erl b/examples/echo_post/src/echo_post_app.erl
index 2c39336..b454740 100644
--- a/examples/echo_post/src/echo_post_app.erl
+++ b/examples/echo_post/src/echo_post_app.erl
@@ -13,7 +13,7 @@
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
- {"/", toppage_handler, []}
+ {"/", toppage_h, []}
]}
]),
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
diff --git a/examples/echo_post/src/toppage_handler.erl b/examples/echo_post/src/toppage_h.erl
index 398a377..1c6446a 100644
--- a/examples/echo_post/src/toppage_handler.erl
+++ b/examples/echo_post/src/toppage_h.erl
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
%% @doc POST echo handler.
--module(toppage_handler).
+-module(toppage_h).
-export([init/2]).
diff --git a/examples/eventsource/src/eventsource_app.erl b/examples/eventsource/src/eventsource_app.erl
index b83a276..932306e 100644
--- a/examples/eventsource/src/eventsource_app.erl
+++ b/examples/eventsource/src/eventsource_app.erl
@@ -13,7 +13,7 @@
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
- {"/eventsource", eventsource_handler, []},
+ {"/eventsource", eventsource_h, []},
{"/", cowboy_static, {priv_file, eventsource, "index.html"}}
]}
]),
diff --git a/examples/eventsource/src/eventsource_handler.erl b/examples/eventsource/src/eventsource_h.erl
index 1276a75..ba5d866 100644
--- a/examples/eventsource/src/eventsource_handler.erl
+++ b/examples/eventsource/src/eventsource_h.erl
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
%% @doc EventSource emitter.
--module(eventsource_handler).
+-module(eventsource_h).
-export([init/2]).
-export([info/3]).
diff --git a/examples/file_server/src/directory_handler.erl b/examples/file_server/src/directory_h.erl
index d16e014..3232a7e 100644
--- a/examples/file_server/src/directory_handler.erl
+++ b/examples/file_server/src/directory_h.erl
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
%% @doc Directory handler.
--module(directory_handler).
+-module(directory_h).
%% REST Callbacks
-export([init/2]).
diff --git a/examples/file_server/src/file_server_app.erl b/examples/file_server/src/file_server_app.erl
index 3f51855..89d5af0 100644
--- a/examples/file_server/src/file_server_app.erl
+++ b/examples/file_server/src/file_server_app.erl
@@ -15,7 +15,7 @@ start(_Type, _Args) ->
{'_', [
{"/[...]", cowboy_static, {priv_dir, file_server, "", [
{mimetypes, cow_mimetypes, all},
- {dir_handler, directory_handler}
+ {dir_handler, directory_h}
]}}
]}
]),
diff --git a/examples/hello_world/src/hello_world_app.erl b/examples/hello_world/src/hello_world_app.erl
index dc1bd17..5922948 100644
--- a/examples/hello_world/src/hello_world_app.erl
+++ b/examples/hello_world/src/hello_world_app.erl
@@ -13,7 +13,7 @@
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
- {"/", toppage_handler, []}
+ {"/", toppage_h, []}
]}
]),
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
diff --git a/examples/hello_world/src/toppage_handler.erl b/examples/hello_world/src/toppage_h.erl
index a5a8458..ee62a2f 100644
--- a/examples/hello_world/src/toppage_handler.erl
+++ b/examples/hello_world/src/toppage_h.erl
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
%% @doc Hello world handler.
--module(toppage_handler).
+-module(toppage_h).
-export([init/2]).
diff --git a/examples/rest_basic_auth/src/rest_basic_auth_app.erl b/examples/rest_basic_auth/src/rest_basic_auth_app.erl
index b8562bb..d595706 100644
--- a/examples/rest_basic_auth/src/rest_basic_auth_app.erl
+++ b/examples/rest_basic_auth/src/rest_basic_auth_app.erl
@@ -13,7 +13,7 @@
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
- {"/", toppage_handler, []}
+ {"/", toppage_h, []}
]}
]),
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
diff --git a/examples/rest_basic_auth/src/toppage_handler.erl b/examples/rest_basic_auth/src/toppage_h.erl
index 2e8250f..21b66ab 100644
--- a/examples/rest_basic_auth/src/toppage_handler.erl
+++ b/examples/rest_basic_auth/src/toppage_h.erl
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
%% @doc Handler with basic HTTP authorization.
--module(toppage_handler).
+-module(toppage_h).
-export([init/2]).
-export([content_types_provided/2]).
diff --git a/examples/rest_hello_world/src/rest_hello_world_app.erl b/examples/rest_hello_world/src/rest_hello_world_app.erl
index e89f633..85bd9b5 100644
--- a/examples/rest_hello_world/src/rest_hello_world_app.erl
+++ b/examples/rest_hello_world/src/rest_hello_world_app.erl
@@ -13,7 +13,7 @@
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
- {"/", toppage_handler, []}
+ {"/", toppage_h, []}
]}
]),
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
diff --git a/examples/rest_hello_world/src/toppage_handler.erl b/examples/rest_hello_world/src/toppage_h.erl
index 7657281..bbff6f7 100644
--- a/examples/rest_hello_world/src/toppage_handler.erl
+++ b/examples/rest_hello_world/src/toppage_h.erl
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
%% @doc Hello world handler.
--module(toppage_handler).
+-module(toppage_h).
-export([init/2]).
-export([content_types_provided/2]).
diff --git a/examples/rest_pastebin/src/rest_pastebin_app.erl b/examples/rest_pastebin/src/rest_pastebin_app.erl
index 31ceff3..0fbfd64 100644
--- a/examples/rest_pastebin/src/rest_pastebin_app.erl
+++ b/examples/rest_pastebin/src/rest_pastebin_app.erl
@@ -13,7 +13,7 @@
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
- {"/[:paste_id]", toppage_handler, []}
+ {"/[:paste_id]", toppage_h, []}
]}
]),
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
diff --git a/examples/rest_pastebin/src/toppage_handler.erl b/examples/rest_pastebin/src/toppage_h.erl
index ddf4c50..712a875 100644
--- a/examples/rest_pastebin/src/toppage_handler.erl
+++ b/examples/rest_pastebin/src/toppage_h.erl
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
%% @doc Pastebin handler.
--module(toppage_handler).
+-module(toppage_h).
%% Standard callbacks.
-export([init/2]).
diff --git a/examples/ssl_hello_world/src/ssl_hello_world_app.erl b/examples/ssl_hello_world/src/ssl_hello_world_app.erl
index 009ab8f..4a9122f 100644
--- a/examples/ssl_hello_world/src/ssl_hello_world_app.erl
+++ b/examples/ssl_hello_world/src/ssl_hello_world_app.erl
@@ -13,7 +13,7 @@
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
- {"/", toppage_handler, []}
+ {"/", toppage_h, []}
]}
]),
PrivDir = code:priv_dir(ssl_hello_world),
diff --git a/examples/ssl_hello_world/src/toppage_handler.erl b/examples/ssl_hello_world/src/toppage_h.erl
index a5a8458..ee62a2f 100644
--- a/examples/ssl_hello_world/src/toppage_handler.erl
+++ b/examples/ssl_hello_world/src/toppage_h.erl
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
%% @doc Hello world handler.
--module(toppage_handler).
+-module(toppage_h).
-export([init/2]).
diff --git a/examples/upload/src/upload_app.erl b/examples/upload/src/upload_app.erl
index 37929cd..2ed5804 100644
--- a/examples/upload/src/upload_app.erl
+++ b/examples/upload/src/upload_app.erl
@@ -13,7 +13,7 @@ start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
{"/", cowboy_static, {priv_file, upload, "index.html"}},
- {"/upload", upload_handler, []}
+ {"/upload", upload_h, []}
]}
]),
{ok, _} = cowboy:start_clear(http, [{port, 8080}], #{
diff --git a/examples/upload/src/upload_handler.erl b/examples/upload/src/upload_h.erl
index 5dbf08f..45db8e1 100644
--- a/examples/upload/src/upload_handler.erl
+++ b/examples/upload/src/upload_h.erl
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
%% @doc Upload handler.
--module(upload_handler).
+-module(upload_h).
-export([init/2]).
diff --git a/examples/websocket/src/websocket_app.erl b/examples/websocket/src/websocket_app.erl
index 90e6c8d..92c7edc 100644
--- a/examples/websocket/src/websocket_app.erl
+++ b/examples/websocket/src/websocket_app.erl
@@ -13,7 +13,7 @@ start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
{"/", cowboy_static, {priv_file, websocket, "index.html"}},
- {"/websocket", ws_handler, []},
+ {"/websocket", ws_h, []},
{"/static/[...]", cowboy_static, {priv_dir, websocket, "static"}}
]}
]),
diff --git a/examples/websocket/src/ws_handler.erl b/examples/websocket/src/ws_h.erl
index 209d4bc..63055df 100644
--- a/examples/websocket/src/ws_handler.erl
+++ b/examples/websocket/src/ws_h.erl
@@ -1,4 +1,4 @@
--module(ws_handler).
+-module(ws_h).
-export([init/2]).
-export([websocket_init/1]).