0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 20:50:24 +00:00
cowboy/examples/ssl_hello_world/src/toppage_h.erl

13 lines
273 B
Erlang
Raw Normal View History

2012-07-13 10:15:22 +02:00
%% Feel free to use, reuse and abuse the code in this file.
%% @doc Hello world handler.
2018-09-07 13:48:43 -04:00
-module(toppage_h).
2012-07-13 10:15:22 +02:00
-export([init/2]).
2012-07-13 10:15:22 +02:00
2016-08-10 17:15:02 +02:00
init(Req0, Opts) ->
Req = cowboy_req:reply(200, #{
2016-04-30 14:41:10 +02:00
<<"content-type">> => <<"text/plain">>
2016-08-10 17:15:02 +02:00
}, <<"Hello world!">>, Req0),
2016-04-30 14:41:10 +02:00
{ok, Req, Opts}.