fix
This commit is contained in:
@@ -120,22 +120,6 @@ handlers::handlers(mgmt_app_config *config, httplib::Server *server)
|
|||||||
}
|
}
|
||||||
#endif // defined(_WIN32)
|
#endif // defined(_WIN32)
|
||||||
|
|
||||||
if (not config_->get_launch_only()) {
|
|
||||||
#if defined(_WIN32)
|
|
||||||
system(
|
|
||||||
fmt::format(
|
|
||||||
R"(start "Repertory Management Portal" "http://127.0.0.1:{}/ui")",
|
|
||||||
config_->get_api_port())
|
|
||||||
.c_str());
|
|
||||||
#elif defined(__linux__)
|
|
||||||
system(fmt::format(R"(xdg-open "http://127.0.0.1:{}/ui")",
|
|
||||||
config_->get_api_port())
|
|
||||||
.c_str());
|
|
||||||
#else // error
|
|
||||||
build fails here
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
std::uint16_t port{};
|
std::uint16_t port{};
|
||||||
if (not utils::get_next_available_port(config_->get_api_port(), port)) {
|
if (not utils::get_next_available_port(config_->get_api_port(), port)) {
|
||||||
fmt::println("failed to detect if port is available|{}",
|
fmt::println("failed to detect if port is available|{}",
|
||||||
@@ -280,6 +264,19 @@ handlers::handlers(mgmt_app_config *config, httplib::Server *server)
|
|||||||
#endif // !defined(_WIN32)
|
#endif // !defined(_WIN32)
|
||||||
std::signal(SIGTERM, quit_handler);
|
std::signal(SIGTERM, quit_handler);
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
system(fmt::format(
|
||||||
|
R"(start "Repertory Management Portal" "http://127.0.0.1:{}/ui")",
|
||||||
|
config_->get_api_port())
|
||||||
|
.c_str());
|
||||||
|
#elif defined(__linux__)
|
||||||
|
system(fmt::format(R"(xdg-open "http://127.0.0.1:{}/ui")",
|
||||||
|
config_->get_api_port())
|
||||||
|
.c_str());
|
||||||
|
#else // error
|
||||||
|
build fails here
|
||||||
|
#endif
|
||||||
|
|
||||||
event_system::instance().start();
|
event_system::instance().start();
|
||||||
|
|
||||||
nonce_thread_ =
|
nonce_thread_ =
|
||||||
|
Reference in New Issue
Block a user