livebook/iframe/lib/livebook_space/application.ex
Jonatan Kłosko e5e13d86c2
Serve iframes from another local port when running on http (#989)
* Serve iframes from another local port when running on http

* Use relative hostname in local iframe URL

* Simplify server start check

* Use random iframe port when Livebook runs on a random port

* Rename space/ to iframe/

* LivebookWeb.IframePlug -> LivebookWeb.IframeEndpoint
2022-02-08 14:45:58 +01:00

14 lines
338 B
Elixir

defmodule LivebookSpace.Application do
@moduledoc false
use Application
def start(_type, _args) do
children = [
{Plug.Cowboy, scheme: :http, plug: LivebookSpaceWeb.Plug, options: [port: 4000]}
]
opts = [strategy: :one_for_one, name: LivebookSpace.Supervisor]
Supervisor.start_link(children, opts)
end
end