Small refactoring

This commit is contained in:
2024-06-27 10:59:54 +02:00
parent 92cd55fa6e
commit 6a9381cef9

View File

@@ -80,15 +80,8 @@ int main(int argc, char *argv[])
App::srv->set_mount_point("/static", "/var/www/static"); App::srv->set_mount_point("/static", "/var/www/static");
auto host = App::DefaultHost; auto host = argc > 1 ? argv[1] : App::DefaultHost;
auto port = App::DefaultPort; auto port = argc > 2 ? atoi(argv[2]) : App::DefaultPort;
if (argc > 1) {
host = argv[1];
}
if (argc > 2) {
port = atoi(argv[2]);
}
std::cout << "Listen on " << host << ":" << port << std::endl; std::cout << "Listen on " << host << ":" << port << std::endl;