[英]Install third party libs, package management, application folder structure in Erlang
I've been studying Erlang
for a while, and want to write a small sample Erlang
application, but I do not know how to do it, I mean more Erlanglish
way. 我学习
Erlang
已有一段时间了,想编写一个小样本的Erlang
应用程序,但是我不知道该怎么做,我的意思是说更多的Erlanglish
方式。
How to install third party libs? 如何安装第三方库? Something like
npm install
for node.js 类似于
npm install
for node.js
What is the recommended folder structure? 推荐的文件夹结构是什么?
Is there some sample yet classical Erlang
application demonstrate it, that I can learn from? 我可以从中学习一些示例但经典的
Erlang
应用程序演示了吗?
推荐的目录结构在此处记录 。
The recommended way of installing an Erlang application is to avoid using a 3rd party packaging system as of now. 推荐的安装Erlang应用程序的方法是,到目前为止, 避免使用第三方包装系统。 We don't have a package manager (note the date of this post, it might change in the future).
我们没有包裹管理员(请注意这篇文章的日期,将来可能会更改)。 Rather, we rely on a tool like
rebar
to package what we call a release . 相反,我们依赖于诸如
rebar
类的工具来打包我们所谓的release 。
A release is a packaging of needed libraries, with correct versions into a standalone version of the Erlang system in a separate directory structure. 发布是对所需库的打包,其中正确的版本在单独的目录结构中包含到Erlang系统的独立版本中。 This structure can be zipped and moved to another machine and run by itself.
可以压缩此结构并将其移动到另一台机器上并自行运行。
There are 3 ways to do this: use reltool
directly use rebar
to call reltool, or use the newly created relx
tool to make release assemblies. 有3种方法来做到这一点:使用
reltool
直接用rebar
打电话reltool,或使用新创建relx
工具,使释放组件。
The problem with an npm
like tool is when you need to have different versions of packages that cannot coexist and you need dependency convergence. 类似
npm
工具的问题在于,当您需要具有无法共存的不同版本的软件包,并且需要依赖项收敛时。 Currently the "solution" is not to solve it in Erlang. 当前,“解决方案”不是在Erlang中解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.