slige/runtime/main.cpp

15 lines
411 B
C++
Raw Normal View History

2024-11-27 13:28:45 +01:00
#include "actions.hpp"
#include "json.hpp"
#include "rpc_server.hpp"
2024-11-08 12:22:42 +01:00
int main()
{
2024-11-26 13:04:40 +01:00
auto rpc = sliger::rpc::RpcServer(
[&](std::unique_ptr<sliger::json::Value> req,
2024-11-26 13:04:40 +01:00
std::unique_ptr<sliger::rpc::BufferedWriter> writer) {
2024-11-27 13:28:45 +01:00
auto action = sliger::rpc::action::action_from_json(std::move(req));
action->perform_action(std::move(writer));
});
rpc.listen();
2024-11-08 12:22:42 +01:00
}