serum v1.4.1 Serum.DevServer.Prompt View Source
Provides access to the Serum development server command line interface.
Link to this section Summary
Functions
Tries to start a Serum development server command line interface.
Link to this section Types
Link to this type
result()
View Sourceresult() :: {:ok, :detached} | {:ok, :quitted} | {:error, :noproc}
Link to this section 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
.