server for a Chess project in c++ [closed]

3 weeks ago 32
ARTICLE AD BOX

I used drogon framework to build non trivial server backend in C++. It is easy to use:

void TestCtrl::asyncHandleHttpRequest( const HttpRequestPtr& req, std::function<void (const HttpResponsePtr &)> &&callback) { auto resp = HttpResponse::newHttpResponse(); resp->setBody("<p>Hello, world!</p>"); callback(resp); }

Full minimal setup can be found under the link but complete simpler server easily fits in one file. If the core functionality server delivers is written in C++, having C++ server as well may not sound completely irrational.

C++ on the browser side is not entirely impossble and likely can be implemented on WebAssembly. I do not know details however because I myself used Rust (Yew for front end).

Read Entire Article