<commit_before>#include "webconfig/WebConfig.h"
#include "StaticFileServing.h"


WebConfig::WebConfig(QObject * parent)
	:  QObject(parent)
	, _port(WEBCONFIG_DEFAULT_PORT)
	, _server(nullptr)
{
	_hyperion = Hyperion::getInstance();
	const Json::Value &config = _hyperion->getJsonConfig();
	_baseUrl = QString::fromStdString(WEBCONFIG_DEFAULT_PATH);

	bool webconfigEnable = true; 

	if (config.isMember("webConfig"))
	{
		const Json::Value & webconfigConfig = config["webConfig"];
		webconfigEnable = webconfigConfig.get("enable", true).asBool();<commit_msg>Fixed random http port due to uninitialized _port (#29)<commit_after>#include "webconfig/WebConfig.h"
#include "StaticFileServing.h"


WebConfig::WebConfig(QObject * parent)
	:  QObject(parent)
	, _port(WEBCONFIG_DEFAULT_PORT)
	, _server(nullptr)
{
	_hyperion = Hyperion::getInstance();
	const Json::Value &config = _hyperion->getJsonConfig();
	_baseUrl = QString::fromStdString(WEBCONFIG_DEFAULT_PATH);
	_port = WEBCONFIG_DEFAULT_PORT;

	bool webconfigEnable = true; 

	if (config.isMember("webConfig"))
	{
		const Json::Value & webconfigConfig = config["webConfig"];
		webconfigEnable = webconfigConfig.get("enable", true).asBool();
{'fraction_non_alphanumeric': 0.134953897736798, 'fraction_numerical': 0.0016764459346186086, 'mean_word_length': 7.122448979591836, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5084276', 'n_tokens_mistral': 408, 'n_tokens_neox': 398, 'n_words': 67}