<commit_before>/* global process, __dirname */

/*
 * Module dependencies.
 */

var express = require('express'),
	app = express(),
	routes = require('./routes'),
	server = require('http').createServer(app),
	path = require('path'),
	multiModule = require('./multi/server');

// all environments
app.set('port', process.env.PORT || 80);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.favicon('public/favicon.ico'));
app.use(require('less-middleware')({ src: __dirname + '/public' }));
app.use(express.static(path.join(__dirname, 'public')));

// development only
if ('development' === app.get('env')) {
	app.use(express.errorHandler());
}

// routes
app.get('/', routes.index);
// game routes
app.get('/symbols', routes.symbols);
app.get('/snake1p/presenter', routes.terminalControllerSnake1pPresenter);
app.get('/snake1p', routes.terminalControllerSnake1pPlayer);
app.get('/snakemp/presenter', routes.terminalControllerSnakeMpPresenter);
app.get('/snakemp', routes.terminalControllerSnakeMpPlayer);
app.get('/snake1s', routes.serverOnescreenSnake);

server.listen(app.get('port'), function() {
	console.log('Express server listening on port ' + app.get('port'));
});
<commit_msg>Added redirect ti index every time a file could not be found.<commit_after>/* global process, __dirname */

/*
 * Module dependencies.
 */

var express = require('express'),
	app = express(),
	routes = require('./routes'),
	server = require('http').createServer(app),
	path = require('path'),
	multiModule = require('./multi/server');

// all environments
app.set('port', process.env.PORT || 80);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.favicon());
app.use(require('less-middleware')({ src: __dirname + '/public' }));
app.use(express.static(path.join(__dirname, 'public')));

// development only
if ('development' === app.get('env')) {
	app.use(express.errorHandler());
}

app.use(function(req, res, next) {
	res.status(404);
	res.redirect('/');
});

// routes
app.get('/', routes.index);
// game routes
app.get('/symbols', routes.symbols);
app.get('/snake1p/presenter', routes.terminalControllerSnake1pPresenter);
app.get('/snake1p', routes.terminalControllerSnake1pPlayer);
app.get('/snakemp/presenter', routes.terminalControllerSnakeMpPresenter);
app.get('/snakemp', routes.terminalControllerSnakeMpPlayer);
app.get('/snake1s', routes.serverOnescreenSnake);

server.listen(app.get('port'), function() {
	console.log('Express server listening on port ' + app.get('port'));
});

{'fraction_non_alphanumeric': 0.20531227566403445, 'fraction_numerical': 0.006101938262742283, 'mean_word_length': 6.055696202531646, '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': '3235450', 'n_tokens_mistral': 910, 'n_tokens_neox': 898, 'n_words': 160}