简体   繁体   English

如何用rebar3设置牛仔

[英]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 ? 我是erlang / cowboy的新手,现在使用rebar3 ,因为99的牛仔正在使用自己的erlang.mk系统,我如何使用rebar3来构建牛仔release Thank you in advance. 先感谢您。

Use the new command to create your project. 使用new命令创建项目。

$ rebar3 new app yourapp

Then in your project path find rebar.config file and add cowboy as dependencie under the deps key: 然后在项目路径中找到rebar.config文件,并在deps键下添加cowboy as dependencie:

{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. 然后使用compile命令rebar3获取已定义的依赖项并编译它们以及您的应用程序。

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. release的最后,您首先需要创建发布结构,然后使用以下命令进行发布。

$ rebar3 new release yourrel
$ rebar3 release

Note that basic usage example of Rebar3 is about cowboy in details. 请注意,Rebar3的基本用法示例详细介绍了牛仔。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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