#include "hwd/config.h" #include namespace hwd { namespace config { int port() { if (const char * from_env = std::getenv(port_variable)) if (int port_number = std::atoi(from_env)) return port_number; return default_port; } const char * host() { if (const char * from_env = std::getenv(host_variable)) return from_env; return default_host; } } // namespace config } // namespace hwd