<commit_before>
// Load external dependencies.
var browserify = require('browserify-middleware');
var express = require('express');
var fs = require('fs');
var less = require('less-middleware');
var lodash = require('lodash');
var path = require('path');

// Server variables.
var server;

// Expose the options.
exports.options = {
	port: 8000
};

// Setup the runtime options.
var runtime = {
	app: {},
	path: {}
};

// Load the runtime app dist settings if available.
if (fs.existsSync(path.join(__dirname, '../etc/app.dist.js'))) {
	lodash.extend(runtime.app, require(path.join(__dirname, '../etc/app.dist.js')));
}

// Load the runtime app settings if available.
if (fs.existsSync(path.join(__dirname, '../etc/app.js'))) {
	lodash.extend(runtime.app, require(path.join(__dirname, '../etc/app.js')));
}

// Load the runtime path settings if available.
if (fs.existsSync(path.join(__dirname, '../etc/path.js'))) {
	lodash.extend(runtime.path, require(path.join(__dirname, '../etc/path.js')));
}

// Load the runtime path dist settings if available.
if (fs.existsSync(path.join(__dirname, '../etc/path.dist.js'))) {
	lodash.extend(runtime.path, require(path.join(__dirname, '../etc/path.dist.js')));
}

// Initialize the server.
exports.initialize = function() {

	// Instantiate the express server.
	server = express();

	// Setup basic middleware.
	server.use(express.logger('dev'));
	server.use(express.bodyParser());

	// Setup layouts middleware.
	server.set('views', __dirname + '/../src/layouts');
	server.set('view engine', 'jade');

	// Setup styles middleware.
	server.use(less({ src: __dirname + '/../src' }));

	// Setup scripts/targets middleware. 
	server.use('/scripts', browserify('../src/scripts'));
	server.use('/targets', browserify('../src/targets'));

	// Setup static asset middleware.
	server.use(express.static(__dirname + '/../src'));

	// Setup error handling middleware.
	server.use(express.errorHandler());<commit_msg>Fixed an issue with the path dist file overriding the user path file.<commit_after>
// Load external dependencies.
var browserify = require('browserify-middleware');
var express = require('express');
var fs = require('fs');
var less = require('less-middleware');
var lodash = require('lodash');
var path = require('path');

// Server variables.
var server;

// Expose the options.
exports.options = {
	port: 8000
};

// Setup the runtime options.
var runtime = {
	app: {},
	path: {}
};

// Load the runtime app dist settings if available.
if (fs.existsSync(path.join(__dirname, '../etc/app.dist.js'))) {
	lodash.extend(runtime.app, require(path.join(__dirname, '../etc/app.dist.js')));
}

// Load the runtime app settings if available.
if (fs.existsSync(path.join(__dirname, '../etc/app.js'))) {
	lodash.extend(runtime.app, require(path.join(__dirname, '../etc/app.js')));
}

// Load the runtime path dist settings if available.
if (fs.existsSync(path.join(__dirname, '../etc/path.dist.js'))) {
	lodash.extend(runtime.path, require(path.join(__dirname, '../etc/path.dist.js')));
}

// Load the runtime path settings if available.
if (fs.existsSync(path.join(__dirname, '../etc/path.js'))) {
	lodash.extend(runtime.path, require(path.join(__dirname, '../etc/path.js')));
}

// Initialize the server.
exports.initialize = function() {

	// Instantiate the express server.
	server = express();

	// Setup basic middleware.
	server.use(express.logger('dev'));
	server.use(express.bodyParser());

	// Setup layouts middleware.
	server.set('views', __dirname + '/../src/layouts');
	server.set('view engine', 'jade');

	// Setup styles middleware.
	server.use(less({ src: __dirname + '/../src' }));

	// Setup scripts/targets middleware. 
	server.use('/scripts', browserify('../src/scripts'));
	server.use('/targets', browserify('../src/targets'));

	// Setup static asset middleware.
	server.use(express.static(__dirname + '/../src'));

	// Setup error handling middleware.
	server.use(express.errorHandler());
{'fraction_non_alphanumeric': 0.19154858299595143, 'fraction_numerical': 0.0020242914979757085, 'mean_word_length': 4.094072164948454, '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': '6666261', 'n_tokens_mistral': 1265, 'n_tokens_neox': 1220, 'n_words': 299}