/* SPDX-License-Identifier: GPL-3.0-or-later Copyright © 2022 Amebis */ #include "../include/version.h" #include "appcomponent.h" #include "controller.h" #include using namespace std; int main() { oatpp::base::Environment::init(); AppComponent components; OATPP_COMPONENT(std::shared_ptr, router); auto myController = std::make_shared(); router->addController(myController); OATPP_COMPONENT(std::shared_ptr, connectionHandler); OATPP_COMPONENT(std::shared_ptr, connectionProvider); oatpp::network::Server server(connectionProvider, connectionHandler); OATPP_LOGI("ZRColaWS", "Server " PRODUCT_VERSION_STR " running on %s:%s", connectionProvider->getProperty("host").getData(), connectionProvider->getProperty("port").getData()); server.run(); oatpp::base::Environment::destroy(); return 0; }