You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defmodule Rest do
use Plug.Router
import Plug.Conn
plug :match
plug :dispatch
get "/hello" do
send_resp(conn, 200, "Hello, world!")
end
match _ do
send_resp(conn, 404, "oops")
end
def start do
Plug.Adapters.Cowboy.http Rest, [], port: 80
end
def stop do
Plug.Adapters.Cowboy.shutdown Rest.HTTP
end
end
I have a Router plug
However, when calling
Rest.start
I getIf I remove the
port: 80
, there is no problem callingRest.start
, and the server listens on port 4000.I am using Elixir v0.15.0.
The text was updated successfully, but these errors were encountered: