Je suivais https://ninenines.eu/docs/en/cowboy/2.0/guide/getting_started/init/2 non définie dans cow-boy hello_handler
quand je lance
gmake new t=cowboy_http n=hello_handler
cela crée src/hello_handler
-module(hello_handler).
-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.
les instructions dit de modifier init/2 mais il n'y a que init/3. Cette documentation est-elle dépassée?
Il semble que 'erlang.mk' a un obsolète. [Link] (https://github.com/ninenines/cowboy/issues/994) – hyun
Merci! Ça marche pour moi .. – quantumpotato