add config.json
This commit is contained in:
parent
556c0548a9
commit
ed3bcc6f4a
6
main.cpp
6
main.cpp
@ -76,7 +76,7 @@ int main()
|
|||||||
const unsigned num_threads = std::thread::hardware_concurrency();
|
const unsigned num_threads = std::thread::hardware_concurrency();
|
||||||
|
|
||||||
net::io_context ioc(num_threads);
|
net::io_context ioc(num_threads);
|
||||||
tcp::acceptor acceptor(net::make_strand(ioc));
|
tcp::acceptor acceptor(net::make_strand(ioc));
|
||||||
|
|
||||||
// Подписываемся на сигналы и при их получении завершаем работу сервера
|
// Подписываемся на сигналы и при их получении завершаем работу сервера
|
||||||
net::signal_set signals(ioc, SIGINT, SIGTERM);
|
net::signal_set signals(ioc, SIGINT, SIGTERM);
|
||||||
@ -91,8 +91,8 @@ int main()
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const auto address = net::ip::make_address("0.0.0.0");
|
const auto address = net::ip::make_address("0.0.0.0");
|
||||||
constexpr net::ip::port_type port = 8080;
|
constexpr net::ip::port_type port = 8080;
|
||||||
http_server::ServeHttp(ioc, {address, port}, [](auto&& req, auto&& sender)
|
http_server::ServeHttp(ioc, {address, port}, [](auto&& req, auto&& sender)
|
||||||
{
|
{
|
||||||
sender(HandleRequest(std::forward<decltype(req)>(req)));
|
sender(HandleRequest(std::forward<decltype(req)>(req)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user