Configuration
NOTE: Read this if you want to pass the App name as the second argument to
leptus:start_listener/2.
Leptus configuration file must be named leptus.config, and it must be put in
the priv directory of the App application.
Sections
handlers
In leptus.config, request handlers should be defined as follows:
{handlers, [{HostMatch, [{module(), State :: any()}]}]}.
Please refer to leptus module types for further details on types.
options
By default, Leptus runs on 127.0.0.1:808-0, but you can override them:
{options,
[
{ip, inet:ip_address()},
{port, inet:port_number()}
]
}.
Note: For an HTTPS listener, cacertfile, certfile and keyfile are required:
{options,
[
{cacertfile, file:name()},
{certfile, file:name()},
{keyfile, file:name()}
]
}.
Please refer to leptus module types for further details on types.