mirror of
https://gitlab.com/niansa/asbots.git
synced 2025-03-06 20:48:25 +01:00
23 lines
487 B
C++
23 lines
487 B
C++
#include "config.hpp"
|
|
#include "instance.hpp"
|
|
|
|
#include "services/test.hpp"
|
|
|
|
#include <uvpp.hpp>
|
|
#include <async/result.hpp>
|
|
using namespace std;
|
|
|
|
|
|
|
|
int main() {
|
|
using namespace uvpp;
|
|
async::run_queue rq;
|
|
async::queue_scope qs{&rq};
|
|
loop_service service;
|
|
|
|
Instance instance(service, config);
|
|
instance.services.push_back(std::make_unique<TestService>());
|
|
|
|
async::detach(instance.run());
|
|
async::run_forever(rq.run_token(), loop_service_wrapper{service});
|
|
}
|