Small refactoring
This commit is contained in:
11
main.cpp
11
main.cpp
@@ -80,15 +80,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
App::srv->set_mount_point("/static", "/var/www/static");
|
||||
|
||||
auto host = App::DefaultHost;
|
||||
auto port = App::DefaultPort;
|
||||
|
||||
if (argc > 1) {
|
||||
host = argv[1];
|
||||
}
|
||||
if (argc > 2) {
|
||||
port = atoi(argv[2]);
|
||||
}
|
||||
auto host = argc > 1 ? argv[1] : App::DefaultHost;
|
||||
auto port = argc > 2 ? atoi(argv[2]) : App::DefaultPort;
|
||||
|
||||
std::cout << "Listen on " << host << ":" << port << std::endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user