View Source Serum.DevServer.Prompt (serum_md v1.6.4)
Provides access to the Serum development server command line interface.
Summary
Functions
Tries to start a Serum development server command line interface.
Types
@type options() :: [{:allow_detach, boolean()}]
@type result() :: {:ok, :detached} | {:ok, :quitted} | {:error, :noproc}
Functions
Tries to start a Serum development server command line interface.
This function first checks if the server is already running. If the server
is not running, this function returns {:error, :noproc}
immediately.
Otherwise, it starts a loop which processes commands from the user. If the
user runs the detach
command, the loop completes and this function returns
{:ok, :detached}
tuple. If the user runs the quit
command, the Serum
development server will be stopped, and then this function will return
{:ok, :quitted}
tuple.
Options
allow_detach
: Controls if users are allowed to detach the command line interface. Defaults totrue
.