listen to 0.0.0.0

This commit is contained in:
Linwenxuan 2024-06-19 17:24:30 +08:00
parent 8ff2eca04a
commit 90a55d47b3
No known key found for this signature in database
GPG Key ID: 13F70E0AB45D3EA4

View File

@ -94,7 +94,7 @@ void Server::Init(int port) {
res.set_content(buffer.GetString(), "application/json"); res.set_content(buffer.GetString(), "application/json");
}); });
bool ret = svr.listen("127.0.0.1", port); // crach here bool ret = svr.listen("0.0.0.0", port); // crach here
} }
catch(std::exception &e) { catch(std::exception &e) {
printf("Server init failed: %s\n", e.what()); printf("Server init failed: %s\n", e.what());