<commit_before><?php
use App\Action\HomeAction as Home;

// Routes
$app->get('/', Home::class . ':home')->setName('home');
$app->post('/login', Home::class . ':auth')->setName('api:login');
$app->get('/logout', Home::class . ':logout')->setName('api:logout');<commit_msg>Quick and dirty online user display<commit_after><?php
use App\Action\HomeAction as Home;
use Slim\Http\Request;
use Slim\Http\Response;

// Routes
$app->get('/', Home::class . ':home')->setName('home');
$app->post('/login', Home::class . ':auth')->setName('api:login');
$app->get('/logout', Home::class . ':logout')->setName('api:logout');

$app->get('/online', function (Request $request, Response $response) {
    $o      = $this->get('o')->addResponse($response);
    $online = array_values(json_decode(file_get_contents('http://localhost:3000/online'), TRUE));

    return $o->say('chat users', $online);
});
{'fraction_non_alphanumeric': 0.25, 'fraction_numerical': 0.004524886877828055, 'mean_word_length': 5.8076923076923075, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5166565', 'n_tokens_mistral': 299, 'n_tokens_neox': 290, 'n_words': 53}