<commit_before>var Hapi = require('hapi');

var server = new Hapi.Server();
var email = require('./email.js');

server.connection({
	port: process.env.PORT || 1337
})

server.route([
	{
	    method: 'POST',
	    path: '/',
	    handler: function (request, reply) {
	        email.mandrill(request.payload.address, request.payload.message, function (error, result) {

	        	console.log('Done: ', arguments);

                if (error) {
                    return reply().code(400);
                } else {
	        	    return reply('Success!');
                }
	        });
	    }
	},
	{
	    method: 'GET',
	    path: '/',
	    handler: function (request, reply) {

	    	return reply('Hello World');
	    }
	}
]);

server.start(function () {
    console.log('Server running at:', server.info.uri);
});
<commit_msg>enable cors<commit_after>var Hapi = require('hapi');

var server = new Hapi.Server();
var email = require('./email.js');

server.connection({
	port: process.env.PORT || 1337
})

server.route([
	{
	    method: 'POST',
	    path: '/',
        cors: true,
	    handler: function (request, reply) {
	        email.mandrill(request.payload.address, request.payload.message, function (error, result) {

	        	console.log('Done: ', arguments);

                if (error) {
                    return reply().code(400);
                } else {
	        	    return reply('Success!');
                }
	        });
	    }
	},
	{
	    method: 'GET',
	    path: '/',
        cors: true,
	    handler: function (request, reply) {

	    	return reply('Hello World');
	    }
	}
]);

server.start(function () {
    console.log('Server running at:', server.info.uri);
});

{'fraction_non_alphanumeric': 0.16587677725118483, 'fraction_numerical': 0.008293838862559242, 'mean_word_length': 2.005338078291815, 'pattern_counts': {'":': 0, '<': 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': '4058471', 'n_tokens_mistral': 559, 'n_tokens_neox': 506, 'n_words': 107}