Sugar v0.4.11 Sugar.App

Summary

Functions

Grabs the application’s running port number or 4000 when opts doesn’t contain the :port keyword

Starts the application, checking if it’s already been started

Callback for start/2. Starts the supervisor

Callback for stop/1

Functions

get_port(opts)

Specs

get_port(Keyword.t) :: pos_integer

Grabs the application’s running port number or 4000 when opts doesn’t contain the :port keyword.

Arguments

  • opts - Keyword - options

Returns

Integer

start()

Specs

start :: :ok

Starts the application, checking if it’s already been started.

start(type, args)

Specs

start(atom, Keyword.t) :: {:ok, pid}

Callback for start/2. Starts the supervisor.

stop(state)

Specs

stop(any) :: :ok

Callback for stop/1.