Didn't open port when release plug_cowboy application

I have a problem when release a plug_cowboy(not phoniex) applicaton.

The dependencies was

  defp deps do
    [
      {:plug_cowboy, "~> 2.0"},
      {:ecto_sql, "~>3.1.0"},
      {:myxql, "~> 0.2.0"},
    ]
  end

When I run this by mix run --no-halt.I can access my application use browser.
But when I release the application with the elixir1.9’s release.
And start the elixir by _build/dev/rel/bin/app_name start.
I can’t access my application from browser.
I found that the port which passed to cowboy didn’t opened.
What’s wrong?

is “server: true” configured on the application endpoint? SImilar thread was recently here: Distillery not start app Phoenix

1 Like

Thank you for you help.
I only use the plug_cowboy without Phoenix.So, I think the server:true wasn’t exists.
But when I rerelease the application. I find that the port was opened.
I didn’t modify any code, and don’t know why.:thinking:
But I think everything is working fine now.

Oh well. Programming.

2 Likes