<commit_before>module.exports = function (restify, request, mysql) {
	// Load environment variables.
	require('dotenv').load();

	// Open Database connection.
	var db = mysql.createPool({
		host:     process.env.MYSQL_SERVER,
		user:     process.env.MYSQL_USER,
		password: <PASSWORD>,
		database: process.env.MYSQL_DATABASE
	});

	db.TABLE_PREFIX = process.env.MYSQL_TABLE_PREFIX;

	// Load models.
	var Photo = require('./models/photo')(db);
	var User  = require('./models/user')(db);

	// Load controllers.
	var controllers = {};
	controllers.photos = require('./controllers/photo')(restify, Photo);
	controllers.users  = require('./controllers/user')(restify, request, User);

	// Start server.
	restify.CORS.ALLOW_HEADERS.push('authorization');
	var server = restify.createServer();
	server.use(restify.gzipResponse());
	server.use(restify.bodyParser());
	server.use(restify.CORS());
	server.use(restify.fullResponse());

	// Authentivation middleware.
	var verify = require('./lib/accesstoken')(restify, request, User);

	// Activate routes.
	require('./routes')(server, controllers, verify);

	// LOGIN TEST
	/*var handleAccessToken = require('./lib/accesstoken')(restify, request, User);
	server.post('/login', handleAccessToken, function (req, res) {
		console.log('logged', req.user);
		res.send(200);
	});*/

	server.listen(process.env.PORT, function() {
		console.log('Server started.');
	});
};<commit_msg>Remove obsolete code.<commit_after>module.exports = function (restify, request, mysql) {
	// Load environment variables.
	require('dotenv').load();

	// Open Database connection.
	var db = mysql.createPool({
		host:     process.env.MYSQL_SERVER,
		user:     process.env.MYSQL_USER,
		password: <PASSWORD>.MYSQL_PASSWORD,
		database: process.env.MYSQL_DATABASE
	});

	db.TABLE_PREFIX = process.env.MYSQL_TABLE_PREFIX;

	// Load models.
	var Photo = require('./models/photo')(db);
	var User  = require('./models/user')(db);

	// Load controllers.
	var controllers = {};
	controllers.photos = require('./controllers/photo')(restify, Photo);
	controllers.users  = require('./controllers/user')(restify, request, User);

	// Start server.
	restify.CORS.ALLOW_HEADERS.push('authorization');
	var server = restify.createServer();
	server.use(restify.gzipResponse());
	server.use(restify.bodyParser());
	server.use(restify.CORS());
	server.use(restify.fullResponse());

	// Authentivation middleware.
	var verify = require('./lib/accesstoken')(restify, request, User);

	// Activate routes.
	require('./routes')(server, controllers, verify);

	server.listen(process.env.PORT, function() {
		console.log('Server started.');
	});
};
{'fraction_non_alphanumeric': 0.17228322605073837, 'fraction_numerical': 0.001135933358576297, 'mean_word_length': 4.562105263157894, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3160593', 'n_tokens_mistral': 890, 'n_tokens_neox': 862, 'n_words': 157}