Packages

A bridge between Glamorous Toolkit (GT) and the BEAM VM, enabling remote code evaluation, object inspection, and Phlow view rendering.

Current section

Files

Jump to
gt_bridge lib gt_bridge.ex
Raw

lib/gt_bridge.ex

defmodule GtBridge do
use Application
@moduledoc """
Documentation for `GtBridge`.
"""
@doc """
Hello world.
## Examples
iex> GtBridge.hello()
:world
"""
def hello do
:world
end
def start(_type, args) do
result = GtBridge.Supervisor.start_link(args)
# Blocks startup; defer it.
Task.start(&GtBridge.View.register_all/0)
result
end
def start_listener(port \\ 0) do
DynamicSupervisor.start_child(
Tcp.Supervisor,
{Tcp.Listener, [host: {0, 0, 0, 0}, port: port]}
)
end
end