mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 23:06:32 +00:00
15 lines
411 B
C++
15 lines
411 B
C++
#include "actions.hpp"
|
|
#include "json.hpp"
|
|
#include "rpc_server.hpp"
|
|
|
|
int main()
|
|
{
|
|
auto rpc = sliger::rpc::RpcServer(
|
|
[&](std::unique_ptr<sliger::json::Value> req,
|
|
std::unique_ptr<sliger::rpc::BufferedWriter> writer) {
|
|
auto action = sliger::rpc::action::action_from_json(std::move(req));
|
|
action->perform_action(std::move(writer));
|
|
});
|
|
rpc.listen();
|
|
}
|