View Source LAP2 (LAP2 v0.1.0)

The main module of the LAP2 server. This module is responsible for starting the supervision tree, loading the config and setting the log level.

Link to this section Summary

Functions

Kill main process supervisor (this stops the whole supervision tree)

Start the server without a config file. The config filesdev_config.json and prod_config.json can be found in the config dir. By default, the DEBUG config is used, if the environment variable LAP2_ENV is set to PROD, the prod config is used. To use a custom config file, set the environment variable LAP2_PROD_CONFIG_PATH or LAP2_DEV_CONFIG_PATH to the path of the config file.

Start the server with a config map. This is useful for testing.

Link to this section Functions

@spec kill(pid()) :: :ok

Kill main process supervisor (this stops the whole supervision tree)

@spec load_config() :: {:ok, map()} | :init.stop()
@spec start() :: {:error, any()} | {:ok, pid()}

Start the server without a config file. The config filesdev_config.json and prod_config.json can be found in the config dir. By default, the DEBUG config is used, if the environment variable LAP2_ENV is set to PROD, the prod config is used. To use a custom config file, set the environment variable LAP2_PROD_CONFIG_PATH or LAP2_DEV_CONFIG_PATH to the path of the config file.

@spec start(map()) :: {:error, any()} | {:ok, pid()}

Start the server with a config map. This is useful for testing.

Link to this function

terminate_child(supervisor_name, pid)

View Source

Kill the child task