简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM