<commit_before>var express = require('express'),
	sio = require('socket.io'),
	fs = require('fs'),
	session = require('express-session'),
	manager = require('./core/manager.js'),
	app = express(),
	http;

app.set('views', 'web/views');
app.set('view engine', 'ejs');

app.use(express.static('bower_components/'));
app.use(express.static('web/public/'))

app.use(session({
	secret: 't3l3pr0mpt3r 1s b35cht3',
	resave: false,
	saveUninitialized: true
}));

app.get('/page/:page', function(req, res){
	var page = req.params.page.replace('html','ejs');
	fs.access('./web/views/pages/'+page, fs.R_OK, function(err){
		if(err){
			res.render('pages/404');
		}
		res.render('pages/'+page);
	});
});

app.get('*', function(req, res){
	res.render('template.ejs');
});

http = app.listen(process.env.OPENSHIFT_INTERNAL_PORT || process.env.PORT || 80, function(err){
	if(err){
		throw new Error(err);
	}
	console.log('Webserver gestartet...');
});

sio = sio(http);
sio.on('connection', function(socket){
	socket.room = null;
	
	socket.on('host', function(){
		if(!socket.room){
			socket.room = manager.createRoom(socket);
		}
		socket.emit('host', socket.room);
	});<commit_msg>Openshift shizzl<commit_after>var express = require('express'),
	sio = require('socket.io'),
	fs = require('fs'),
	session = require('express-session'),
	manager = require('./core/manager.js'),
	app = express(),
	http;

app.set('views', 'web/views');
app.set('view engine', 'ejs');

app.use(express.static('bower_components/'));
app.use(express.static('web/public/'))

app.use(session({
	secret: 't3l3pr0mpt3r 1s b35cht3',
	resave: false,
	saveUninitialized: true
}));

app.get('/page/:page', function(req, res){
	var page = req.params.page.replace('html','ejs');
	fs.access('./web/views/pages/'+page, fs.R_OK, function(err){
		if(err){
			res.render('pages/404');
		}
		res.render('pages/'+page);
	});
});

app.get('*', function(req, res){
	res.render('template.ejs');
});

http = app.listen(process.env.OPENSHIFT_INTERNAL_PORT || process.env.PORT || 80, process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1', function(err){
	if(err){
		throw new Error(err);
	}
	console.log('Webserver gestartet...');
});

sio = sio(http);
sio.on('connection', function(socket){
	socket.room = null;
	
	socket.on('host', function(){
		if(!socket.room){
			socket.room = manager.createRoom(socket);
		}
		socket.emit('host', socket.room);
	});
{'fraction_non_alphanumeric': 0.22436165759732105, 'fraction_numerical': 0.013394725826705735, 'mean_word_length': 5.0353535353535355, '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': '5028746', 'n_tokens_mistral': 932, 'n_tokens_neox': 892, 'n_words': 143}