【发布时间】:2017-10-18 16:49:32
【问题描述】:
我正在尝试让我的 Phoenix 应用程序在端口 4000 上进行侦听,但它无法正常工作。首先,我使用MIX_ENV=prod mix release --env=prod 生成我的生产应用程序。然后,我将_build 目录同步到我的服务器。然后我运行PORT=4000 ./_build/prod/rel/rumbl/bin/rumbl start。然后当我curl localhost:4000 时,我没有得到任何回应。
这是我的config/prod.exs:
use Mix.Config
config :rumbl, Rumbl.Endpoint,
http: [port: {:system, "PORT"}],
url: [host: "localhost", port: {:system, "PORT"}],
cache_static_manifest: "priv/static/manifest.json"
config :logger, level: :info
import_config "prod.secret.exs"
【问题讨论】: