<commit_before>require_relative './composer.rb'

class Frontend
	def initialize(socket)
		@socket = socket
	end

	def response(request)

		# Special index case
		if request[1] == "/"
			print "1"
			request[1] = '/index.html'
		end

		print "###########################"
		print request[1]
		print "###########################"

		database = read_YAML(read_YAML("config.yml")["database"])
		@socket.print http_compose request[1], database
	end
end<commit_msg>Fixed it. I hate ruby >:(<commit_after>require_relative './composer.rb'

class Frontend
	def initialize(socket)
		@socket = socket
	end

	def response(request)

		# Special index case
		if ["/", "/dashboard.html"].include? request[1]
			request[1] = '/index.html'
		end

		# print "###########################"
		# print request[1]
		# print "###########################"

		database = read_YAML(read_YAML("config.yml")["database"])
		@socket.print http_compose request[1], database
	end
end
{'fraction_non_alphanumeric': 0.24, 'fraction_numerical': 0.009473684210526316, 'mean_word_length': 4.594117647058823, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5726072', 'n_tokens_mistral': 344, 'n_tokens_neox': 304, 'n_words': 69}