复现已有算法

This commit is contained in:
cloud
2026-07-14 15:43:18 +08:00
parent abebd2a683
commit 50b8111fd9
860 changed files with 182250 additions and 18 deletions
+23
View File
@@ -0,0 +1,23 @@
#include <drogon/drogon.h>
using namespace drogon;
int main()
{
app()
.setLogPath("./")
.setLogLevel(trantor::Logger::kWarn)
.addListener("0.0.0.0", 7770)
.setThreadNum(0)
.registerSyncAdvice([](const HttpRequestPtr &req) -> HttpResponsePtr {
const auto &path = req->path();
if (path.length() == 1 && path[0] == '/')
{
auto response = HttpResponse::newHttpResponse();
response->setBody("<p>Hello, world!</p>");
return response;
}
return nullptr;
})
.run();
}