The bind IP address currently is only configured via ugly {a, b, c, d} tuples. Not only that, the server logs always state that server is running on 127.0.0.1 even if its not. Thats why, I've decided to make bind_addr option that is readable and possible to configure as non-tuple type. This option is handled by maru and translated to {:ip, {a, b, c, d}} option handled by lower layers.
Since HTTP/HTTPS endpoints were started independently from the Application, they are not shut down when maru is stopped. This does not feel like expected behaviour. Therefore, all endpoints are now started in the Application's supervision tree.
Also I've deduplicated some code in the Application's startup.
This PR addresses 2 issues:
The bind IP address currently is only configured via ugly
{a, b, c, d}
tuples. Not only that, the server logs always state that server is running on 127.0.0.1 even if its not. Thats why, I've decided to makebind_addr
option that is readable and possible to configure as non-tuple type. This option is handled bymaru
and translated to{:ip, {a, b, c, d}}
option handled by lower layers.Since HTTP/HTTPS endpoints were started independently from the Application, they are not shut down when
maru
is stopped. This does not feel like expected behaviour. Therefore, all endpoints are now started in the Application's supervision tree.Also I've deduplicated some code in the Application's startup.