<commit_before><?php
use Psr7Middlewares\Middleware;

putenv("ENV=dev");


require '../vendor/autoload.php';
$config = [];
require_once '../config/general.php';
require_once '../config/db.php';

$app = new \Slim\App(["settings" => $config]);
$container = $app->getContainer();
// Configure the Containers.
require_once '../config/containers.php';

$app->add(Middleware::TrailingSlash(false)->redirect(301))
    ->add(Middleware::ResponseTime())
    ->add(Middleware::FormatNegotiator()->defaultFormat('json'))
    ->add($container->get('csrf'));


require_once '../routing/routes.php';
$app->run();
<commit_msg>init session. (for later addition of auth and csrf protection)<commit_after><?php
use Psr7Middlewares\Middleware;

// Start PHP session
putenv("ENV=dev");
session_start();


require '../vendor/autoload.php';
$config = [];
require_once '../config/general.php';
require_once '../config/db.php';

$app = new \Slim\App(["settings" => $config]);
$container = $app->getContainer();
// Configure the Containers.
require_once '../config/containers.php';

$app->add(Middleware::TrailingSlash(false)->redirect(301))
    ->add(Middleware::ResponseTime())
    ->add(Middleware::FormatNegotiator()->defaultFormat('json'))
    ->add($container->get('csrf'));


require_once '../routing/routes.php';
$app->run();

{'fraction_non_alphanumeric': 0.21390374331550802, 'fraction_numerical': 0.006111535523300229, 'mean_word_length': 5.359223300970874, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '1727302', 'n_tokens_mistral': 424, 'n_tokens_neox': 427, 'n_words': 71}