我下面https://ninenines.eu/docs/en/cowboy/2.0/guide/getting_started/的init/2牛仔hello_handler不確定
當我運行
gmake new t=cowboy_http n=hello_handler
這將創建的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.
指示說要修改的init/2但只有init/3。這份文件是否過時..?
它看起來像'erlang.mk'有一個過時的。[鏈接](https://github.com/ninenines/cowboy/issues/994) – hyun
謝謝!這對我有用.. – quantumpotato