<commit_before>/*jslint node: true, nomen: true, white: true*/
/*!
 * This is the default bootstrap script for a Sitegear3 website.
 *
 * Treat this as a fully functional template.  Middleware sequence can be modified, for example, if you don't need CSRF
 * prevention, then remove the middleware for it.  The templating engine can also be easily swapped out for any other
 * express-compatible engine.
 */

(function (poweredBy, sitegear3, swig, fs) {
	"use strict";

	sitegear3.ready(function () {
		// Create the application instance
		var app = sitegear3();

		// Pre-configure
		if (app.get('env') === 'development') {
			swig.setDefaults({ cache: false });
		}

		// Generic setup code
		app.initialise(require('./settings.json'))
			.use(poweredBy('sitegear3'))
			.use(sitegear3.connect.logger())
			.use(sitegear3.connect.compress())
			.use(sitegear3.connect.static(__dirname + '/static'))
			.use(sitegear3.connect.cookieParser())
			.use(sitegear3.connect.cookieSession({ "baseKey": "sitegear3.session", "secret": "Sitegear3" }))
			.use(sitegear3.connect.csrf())
			.use(sitegear3.helpers.prepareView(app))
			.use(app.router)
			.use(sitegear3.helpers.notFound())
			.use(sitegear3.helpers.internalServerError())
			.persistence('filesystem', { root: __dirname + '/data' })
			.mapRoutes(require('./routes.json'))
			.engine('html', swig.renderFile)
			.set('views', __dirname + '/templates');<commit_msg>Rename "helpers" to "middleware"<commit_after>/*jslint node: true, nomen: true, white: true*/
/*!
 * This is the default bootstrap script for a Sitegear3 website.
 *
 * Treat this as a fully functional template.  Middleware sequence can be modified, for example, if you don't need CSRF
 * prevention, then remove the middleware for it.  The templating engine can also be easily swapped out for any other
 * express-compatible engine.
 */

(function (poweredBy, sitegear3, swig, fs) {
	"use strict";

	sitegear3.ready(function () {
		// Create the application instance
		var app = sitegear3();

		// Pre-configure
		if (app.get('env') === 'development') {
			swig.setDefaults({ cache: false });
		}

		// Generic setup code
		app.initialise(require('./settings.json'))
			.use(poweredBy('sitegear3'))
			.use(sitegear3.connect.logger())
			.use(sitegear3.connect.compress())
			.use(sitegear3.connect.static(__dirname + '/static'))
			.use(sitegear3.connect.cookieParser())
			.use(sitegear3.connect.cookieSession({ "baseKey": "sitegear3.session", "secret": "Sitegear3" }))
			.use(sitegear3.connect.csrf())
			.use(sitegear3.middleware.prepareView(app))
			.use(app.router)
			.use(sitegear3.middleware.notFound())
			.use(sitegear3.middleware.internalServerError())
			.persistence('filesystem', { root: __dirname + '/data' })
			.mapRoutes(require('./routes.json'))
			.engine('html', swig.renderFile)
			.set('views', __dirname + '/templates');
{'fraction_non_alphanumeric': 0.15561758548499652, 'fraction_numerical': 0.011165387299371946, 'mean_word_length': 4.212727272727273, 'pattern_counts': {'":': 4, '<': 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': '6084248', 'n_tokens_mistral': 1027, 'n_tokens_neox': 944, 'n_words': 220}