[erlang-questions] problems with cowboy hello world

Loïc Hoguin essen@REDACTED
Thu Mar 12 09:51:09 CET 2015


On 03/12/2015 05:18 AM, Garry Hodgson wrote:
> -export( [ init/3, terminate/3 ] ).
> init( Transport, Req, Opts ) ->

This is the Cowboy 1.0.x interface.

>      Reply = cowboy_req:reply(

This is the upcoming Cowboy 2 interface. The 1.0.x cowboy_req:reply 
function returns {ok, Req}. This is what causes the error later on.

Make sure you read the correct version of the docs. If it helps you can 
install the man pages of the version you're using with "make docs ; make 
install-docs" and then man COWBOY_MODULE will work.


Loïc Hoguin

More information about the erlang-questions mailing list