【发布时间】:2016-09-05 15:20:42
【问题描述】:
我浏览了https://hexdocs.pm/distillery/getting-started.html 文档,但无法启动基本的 Phoenix 应用程序。这是我的工作:
mix phoenix.new test_app --no-ecto
cd test_app
我更新了mix.exs 文件以包含酿酒厂部分:
[...]
defp deps do
[{:phoenix, "~> 1.2.0-rc"},
{:phoenix_pubsub, "~> 1.0.0-rc"},
{:phoenix_html, "~> 2.5"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:cowboy, "~> 1.0"},
{:distillery, "~> 0.9"}]
end
[...]
然后我运行以下命令:
mix deps.get
mix compile
mix release.init
export PORT=4000
./node_modules/brunch/bin/brunch b -p
MIX_ENV=prod mix do phoenix.digest, release --env=prod
结果如下:
05 Sep 17:16:02 - info: compiled 6 files into 2 files, copied 3 in 1.7 sec
Check your digested files at "priv/static"
==> Assembling release..
==> Building release test_app:0.0.1 using environment prod
==> Packaging release..
==> Release successfully built!
You can run it in one of the following ways:
Interactive: rel/test_app/bin/test_app console
Foreground: rel/test_app/bin/test_app foreground
Daemon: rel/test_app/bin/test_app start
据我了解,我应该可以使用命令启动 Phoenix 应用程序
rel/test_app/bin/test_app foreground
但是当我这样做时,我无法通过 URL http://localhost:4000 的浏览器访问它
是我的设置有误还是我误解了系统?如何启动新版本?
【问题讨论】:
标签: elixir phoenix-framework distillery