A GenServer that manages a Lightpanda browser process.
Starts the binary in serve mode on an automatically-assigned port, waits for it to be ready, and provides the WebSocket URL for CDP connections.
Usage
{:ok, pid} = Lightpanda.Server.start_link()
ws_url = Lightpanda.Server.ws_url(pid)
# => "ws://127.0.0.1:52431"Options
:host- the host to bind to (default:"127.0.0.1"):port- the port to bind to (default: automatically assigned):extra_args- additional CLI arguments to pass to the binary:name- GenServer name registration
Summary
Functions
Returns the base HTTP URL (e.g. for /json/version).
Returns a specification to start this module under a supervisor.
Returns the port number the server is listening on.
Starts a Lightpanda server process.
Stops the server and the underlying Lightpanda process.
Returns the WebSocket URL for CDP connections.
Functions
Returns the base HTTP URL (e.g. for /json/version).
Returns a specification to start this module under a supervisor.
See Supervisor.
Returns the port number the server is listening on.
Starts a Lightpanda server process.
Stops the server and the underlying Lightpanda process.
Returns the WebSocket URL for CDP connections.
Blocks until the server is ready, up to the timeout.