magellan_microservice v0.1.9 MagellanMicroservice.Server
This module handles the start-up sequence of the server which uses cowboy and plug.
Summary
Functions
This funtion tries to read the port, on which the server should run, from the environment variable PORT
.
As the log indicates the fallback is port 8080
This start_link/0
function is invoked by the MagellanMicroservice.start_link/0
.
It registers the status function status/0
and starts the server on the port specified by specify_port/0
Ths function gets invoked by MagellanMicroservice.AppStatus.get_status/0
and MagellanMicroservice.AppStatus.get_health/0
.
It returns the current status of the module
Functions
Specs
specify_port :: integer
This funtion tries to read the port, on which the server should run, from the environment variable PORT
.
As the log indicates the fallback is port 8080
.
Specs
start_link :: any
This start_link/0
function is invoked by the MagellanMicroservice.start_link/0
.
It registers the status function status/0
and starts the server on the port specified by specify_port/0
.
Specs
status :: %{optional(atom) => atom}
Ths function gets invoked by MagellanMicroservice.AppStatus.get_status/0
and MagellanMicroservice.AppStatus.get_health/0
.
It returns the current status of the module.