Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to setup cowboy with rebar3

I am a newbie of erlang/cowboy, using rebar3 now, as 99's cowboy is using its own erlang.mk system, how can I use rebar3 to build a cowboy release? Thank you in advance.

like image 955
perigee Avatar asked Feb 02 '16 07:02

perigee


1 Answers

Use the new command to create your project.

$ rebar3 new app yourapp

Then in your project path find rebar.config file and add cowboy as dependencie under the deps key:

{deps, 
    [{cowboy, {git, "git://github.com/ninenines/cowboy.git", {tag, "1.0.1"}}}]}.

Then using compile command rebar3 fetch defined dependencies and compile them as well as your application.

rebar3 compile

At the end for making a release you first need to create your release structure and then making a release with following commands.

$ rebar3 new release yourrel
$ rebar3 release

Note that basic usage example of Rebar3 is about cowboy in details.

like image 73
Hamidreza Soleimani Avatar answered Nov 12 '22 11:11

Hamidreza Soleimani