elixir-crawly / crawly

Crawly, a high-level web crawling & scraping framework for Elixir.
https://hexdocs.pm/crawly
Apache License 2.0
953 stars 112 forks source link

Make the management tool opt-in by default #262

Closed aej closed 3 months ago

aej commented 1 year ago

I think it would be more convenient for the management tool to be removed by default from the application children and instead make it opt-in.

This would let library users who do not want to run the management tool at all, or who want to run the management tool in a different place (i.e inside another Plug-based application/supervision tree) be able to do so without unnecessarily running a webserver.

We can then instruct library users to simply add the Crawly.API.Router to their supervision tree with whatever configuration/plug-compatible webserver they choose.

# application.ex
defmodule MyApp.Application do
  use Application

  def start(_) do
    children = [
      ...
      {Plug.Cowboy, scheme: :http, plug: Crawly.API.Router}
      ...
    ]
  end
end
oltarasenko commented 1 year ago

I like the idea!

oltarasenko commented 1 year ago

Hey @aej I have tried to address this idea in the: https://github.com/elixir-crawly/crawly/pull/265

aej commented 1 year ago

Hey @aej I have tried to address this idea in the: #265

Fantastic - it looks good to me.

samullen commented 11 months ago

Any chance of getting this released soon? Pretty please?

oltarasenko commented 11 months ago

Yes sure. There is no reason to keep it unreleased. let me prepare the release early this week