| 41 | int32_t port = 8091; |
| 42 | |
| 43 | Result start(AsyncEventLoop& loop) |
| 44 | { |
| 45 | SC_TRY(server.init(Span<Connection>(connections))); |
| 46 | SC_TRY(router.init(routes)); |
| 47 | SC_TRY(server.start(loop, interface.view(), static_cast<uint16_t>(port))); |
| 48 | server.onRequest.bind<ApiServerExample, &ApiServerExample::onRequest>(*this); |
| 49 | return Result(true); |
| 50 | } |
| 51 | |
| 52 | void onRequest(HttpConnection& connection) |
| 53 | { |
no test coverage detected