<commit_before>"use strict";

var port = process.env.PORT || 8080;
var file = require("fs").readFileSync;
var glob = require("glob");
var path = require("path");

var rested = require("rested");

var routes = glob.sync("routes/*.js").map(function (e, i, a) {
	return require(path.join(__dirname, e));
});

var server = rested.createServer({
	"crt": file(path.join(__dirname, "files/api.munapps.ca.crt")),
	"key": file(path.join(__dirname, "files/api.munapps.ca.key")),
	"secure": true,
	"routes": routes
});

server.listen(port, function () {
	console.log("Server listening on port " + port);
});<commit_msg>Add headers common to each request<commit_after>"use strict";

var port = process.env.PORT || 8080;
var file = require("fs").readFileSync;
var glob = require("glob");
var path = require("path");

var rested = require("rested");

var routes = glob.sync("routes/*.js").map(function (e, i, a) {
	return require(path.join(__dirname, e));
});

var server = rested.createServer({
	"crt": file(path.join(__dirname, "files/api.munapps.ca.crt")),
	"key": file(path.join(__dirname, "files/api.munapps.ca.key")),
	"secure": true,
	"routes": routes
});

server.eachRequest(function (request, response) {
	response.setHeader("X-Powered-By", "Coffee");
	response.setHeader("X-Shenanigans", "none");
	response.setHeader("X-GitHub", "http://git.io/3K55mA");
});

server.listen(port, function () {
	console.log("Server listening on port " + port);
});
{'fraction_non_alphanumeric': 0.2045769764216366, 'fraction_numerical': 0.0076282940360610264, 'mean_word_length': 5.529411764705882, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, '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': '4271690', 'n_tokens_mistral': 510, 'n_tokens_neox': 504, 'n_words': 108}