<commit_before>var http = require('http');
var url = require('url');
var port = 80;

var server = http.createServer(function (request, response)
{
    try {
	//while the server is running, goto the localhost (127.0.0.1) in your browser to display the message below
        console.log('Server Pinged');
    } 
    catch (e) {
        response.writeHead(500, { 'content-type': 'text/plain' });
        response.write('ERROR:' + e);
        response.end('\n');
    }

});
server.listen(port);

console.log('Hello World!');<commit_msg>1 Add Interactive Server functions<commit_after>var http = require('http');
var url = require('url');
var port = 8000;

var server = http.createServer(function (request, response){

    try {
		//go to http://127.0.0.1:8000/?req=Monty
		console.log('Server Pinged');	//Ping the server (will show in the cmd prompt)
		//The below will be written to the Web Browser
		response.writeHead(200, {"Content-Type": "text/plain"});
		var req = checkURL(request); 	//Passes request into the checkURL function and stores output into the req variable
		var resp;
		if(req == "Aaron"){				//If the page is Aaron...
			resp = "Gavendo";			//Response is Gavendo
		}
		else if(req == "Monty"){			//....
			resp = "python";			//....
		}
		else if(req == "Hello"){			//....
			resp = "World";				//....
		}
		else{	//If you enter in a wrong URL it will give this message to help you.
			resp = "Please Enter: Aaron, Monty or Hello";
		}
		response.write(resp);			//Write the response on the web page.
		response.end();
    } 
    catch (e) {
        response.writeHead(500, { 'content-type': 'text/plain' });
        response.write('ERROR:' + e);
        response.end('\n');
    }

});
server.listen(port);

console.log('The server has run');		//This is for the cmd prompt. Runs once at the start.

function checkURL(request){
	var phrase = url.parse(request.url, true).query;
	// this checks for a query with a property called 'req' and returns its value.
	return phrase.req;
}
{'fraction_non_alphanumeric': 0.15863453815261044, 'fraction_numerical': 0.01606425702811245, 'mean_word_length': 2.9309664694280078, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2168711', 'n_tokens_mistral': 697, 'n_tokens_neox': 635, 'n_words': 207}