<commit_before>var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
	res.render('index', {
		title: 'SportCast!'
	});
});

module.exports = router;<commit_msg>get access ip address and time<commit_after>var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
	res.render('index', {
		title: 'SportCast!'
	});
	console.log('Accessed '+getTime()+' '+getIpAddress(req));
});

function getIpAddress(req) {
	if (req.headers['x-forwarded-for']) {
		return req.headers['x-forwarded-for'];
	}
	if (req.connection && req.connection.remoteAddress) {
		return req.connection.remoteAddress;
	}
	if (req.connection.socket && req.connection.socket.remoteAddress) {
		return req.connection.socket.remoteAddress;
	}
	if (req.socket && req.socket.remoteAddress) {
		return req.socket.remoteAddress;
	}

	return '0.0.0.0';
}
function getTime() {
	var date=new Date();
	var time=date.getFullYear()+'/'+(date.getMonth()+1)+'/'+date.getDate()+' '+
				date.getHours()+':'+date.getMinutes()+':'+date.getSeconds();
	return time;
}

module.exports = router;
{'fraction_non_alphanumeric': 0.20016891891891891, 'fraction_numerical': 0.004222972972972973, 'mean_word_length': 4.895522388059701, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '1652743', 'n_tokens_mistral': 422, 'n_tokens_neox': 406, 'n_words': 76}