Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept module plugs in Kino.Proxy.listen/1 #448

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

wojtekmach
Copy link
Contributor

An example would be:

defmodule AppRouter do
  use Plug.Router

  plug :match
  plug :dispatch

  get "/hello" do
    send_resp(conn, 200, "world")
  end

  match _ do
    send_resp(conn, 404, "oops")
  end
end

Kino.Proxy.listen(AppRouter)

@wojtekmach wojtekmach changed the title Accept plugs in Kino.Proxy.listen/1 Accept module plugs in Kino.Proxy.listen/1 Jun 20, 2024
lib/kino/bridge.ex Outdated Show resolved Hide resolved
@jonatanklosko jonatanklosko merged commit 4094617 into livebook-dev:main Jun 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants