gpt4 book ai didi

elixir - 如何将 phoenix.server 作为守护进程启动

转载 作者:行者123 更新时间:2023-12-03 23:02:59 24 4
gpt4 key购买 nike

下面的命令在生产模式下运行 phoenix.server,并作为部署 phoenix 的命令给出。

MIX_ENV=prod PORT=4001 iex -S mix phoenix.server

但是,上述命令以交互方式运行服务器并关闭终端,停止 phoenix.server 运行。如何让 phoenix.server 在后台运行?

最佳答案

这应该可以解决问题:

MIX_ENV=prod PORT=4001 elixir --erl "-detached" -S mix phx.server

查询 elixir --help想要查询更多的信息。

关于elixir - 如何将 phoenix.server 作为守护进程启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30061044/

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