<commit_before><?php
require_once 'vendor/autoload.php';
use \Fleet\Utils as Utils;
use \Fleet\BlogManager;
use \Fleet\BlogRsser;
use Handlebars\Handlebars;
use Handlebars\Loader\FilesystemLoader;

putenv("env=development");
// putenv("env=production");

function error_handler($error) {
  header("Location: /i-am-so-sorry");
}

if(getenv("env")=="production") {
  set_error_handler('error_handler');
  error_reporting(~E_ALL);
} else {
  error_reporting(~E_NOTICE);
}

# Getting configuration from config.json
$config = json_decode(file_get_contents("config.json"))->{getenv("env")};

// needed when installed into subdirectory
// check https://github.com/chriso/klein.php/wiki/Sub-Directory-Installation
$base  = dirname($_SERVER['PHP_SELF']);
if(ltrim($base, '/')){
    $_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'], strlen($base));
}
<commit_msg>env.php is now back<commit_after><?php
require_once 'vendor/autoload.php';
use \Fleet\Utils as Utils;
use \Fleet\BlogManager;
use \Fleet\BlogRsser;
use Handlebars\Handlebars;
use Handlebars\Loader\FilesystemLoader;

include("env.php");

function error_handler($error) {
  header("Location: /i-am-so-sorry");
}

if(getenv("env")=="production") {
  set_error_handler('error_handler');
  error_reporting(~E_ALL);
} else {
  error_reporting(~E_NOTICE);
}

# Getting configuration from config.json
$config = json_decode(file_get_contents("config.json"))->{getenv("env")};

// needed when installed into subdirectory
// check https://github.com/chriso/klein.php/wiki/Sub-Directory-Installation
$base  = dirname($_SERVER['PHP_SELF']);
if(ltrim($base, '/')){
    $_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'], strlen($base));
}

{'fraction_non_alphanumeric': 0.17789598108747046, 'fraction_numerical': 0.0, 'mean_word_length': 6.425438596491228, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '6141791', 'n_tokens_mistral': 599, 'n_tokens_neox': 591, 'n_words': 92}