1
0
Fork 0
mirror of synced 2024-07-01 20:50:49 +12:00

Test realtime server

This commit is contained in:
Eldad Fux 2020-10-19 18:09:27 +03:00
parent 210fa9fd64
commit 3f0595c04a

View file

@ -30,6 +30,19 @@ App::get('/v1/health/version')
$response->json(['version' => APP_VERSION_STABLE]);
}, ['response']);
App::get('/v1/health/realtime')
->desc('Get Realtime')
->groups(['api', 'health'])
->label('scope', 'public')
->action(function ($response) {
/** @var Utopia\Response $response */
$redis = new Redis();
$redis->connect('redis', 6379);
$redis->publish('realtime', 'I\'m a live message');
$response->json(['status' => 'OK']);
}, ['response']);
App::get('/v1/health/db')
->desc('Get DB')
->groups(['api', 'health'])