<commit_before>
var config = require( './config' )( ),
	express = require( 'express' ),
	cons = require( 'consolidate' ),
	mongo = require( 'mongodb' ).MongoClient,
	app = module.exports = express( );

// environment settings
app.configure( function( ) {
	// configure view engine
	app.engine( 'html', cons.dot );
	app.set( 'view engine', 'html' );
	app.set( 'views', __dirname + '/views' );
	app.use( express.favicon( ) );

	// logging
	if ( !module.parent ) app.use( express.logger( 'dev' ) );

	// compress response data with gzip / deflate
	app.use( express.compress( ) );

	// parse request bodies (req.body)
	app.use( express.bodyParser( ) );

	// support _method (PUT in forms etc)
	app.use( express.methodOverride( ) );
});

mongo.connect( 'mongodb://' + config.server[ config.environment ].database.host + ':' + config.server[ config.environment ].database.port + '/' + config.server[ config.environment ].database.name, function( err, db ) {
	if ( err ) {
		throw new Error( 'Sorry, there is no mongo db server running.' );
	}
	else {
		var attachDb = function( req, res, next ) {
			req.db = db;
			next( );
		};

		// serve system static files
		app.use( '/system/img', express.static( __dirname + '/controllers/system/public/img' ) );
		app.use( '/system/css', express.static( __dirname + '/controllers/system/public/css' ) );
		app.use( '/system/js', express.static( __dirname + '/controllers/system/public/js' ) );

		// load controllers
		require( './boot' )( app, {
			verbose: !module.parent,
			database: attachDb
		} );
<commit_msg>moved system static includes<commit_after>
var config = require( './config' )( ),
	express = require( 'express' ),
	cons = require( 'consolidate' ),
	mongo = require( 'mongodb' ).MongoClient,
	app = module.exports = express( );

// environment settings
app.configure( function( ) {
	// configure view engine
	app.engine( 'html', cons.dot );
	app.set( 'view engine', 'html' );
	app.set( 'views', __dirname + '/views' );
	app.use( express.favicon( ) );

	// logging
	if ( !module.parent ) app.use( express.logger( 'dev' ) );

	// compress response data with gzip / deflate
	app.use( express.compress( ) );

	// parse request bodies (req.body)
	app.use( express.bodyParser( ) );

	// support _method (PUT in forms etc)
	app.use( express.methodOverride( ) );
});

mongo.connect( 'mongodb://' + config.server[ config.environment ].database.host + ':' + config.server[ config.environment ].database.port + '/' + config.server[ config.environment ].database.name, function( err, db ) {
	if ( err ) {
		throw new Error( 'Sorry, there is no mongo db server running.' );
	}
	else {
		var attachDb = function( req, res, next ) {
			req.db = db;
			next( );
		};

		// load controllers
		require( './boot' )( app, {
			verbose: !module.parent,
			database: attachDb
		} );

		// serve system static files
		app.use( '/system/img', express.static( __dirname + '/controllers/system/public/img' ) );
		app.use( '/system/css', express.static( __dirname + '/controllers/system/public/css' ) );
		app.use( '/system/js', express.static( __dirname + '/controllers/system/public/js' ) );

{'fraction_non_alphanumeric': 0.17826226354600833, 'fraction_numerical': 0.0, 'mean_word_length': 3.4571428571428573, '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': '1617994', 'n_tokens_mistral': 1079, 'n_tokens_neox': 1022, 'n_words': 265}