gpt4 book ai didi

ruby - 将 Sinatra/Rack 应用程序制作成单个本地可执行文件有什么好处?

转载 作者:太空宇宙 更新时间:2023-11-03 16:12:05 24 4
gpt4 key购买 nike

我正在阅读 description拉斯维加斯,这是一颗 gem ,

aims to solve the simple problem of creating executable versions of Sinatra/Rack apps.

我不知道这是一个需要解决的问题。

这似乎有可疑好处的原因是:

Now if you run ./my_app it should:

* find an appropriate rack handler (thin. mongrel)
* find an available port
* launch the app in a browser
* put itself in the background
* write a .pid and a .url file

运行 Sinatra 应用程序不是已经非常容易了吗?你只需输入

ruby my_app.rb 

除了应用程序是后台进程之外,所有这些相同的事情都会发生。

为什么需要可执行文件?

最佳答案

在我看来就像是 Sinatra/Rack 的便利包装器,除了守护进程(.pid.url 最有可能再次“找到”它)和启动与裸机 Sinatra/Rack 相比,这似乎没有任何优势的浏览器。

关于ruby - 将 Sinatra/Rack 应用程序制作成单个本地可执行文件有什么好处?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1481349/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com