<commit_before>/**
 * Module dependencies.
 */

const config = require('lib/config')
const express = require('express')
const errorhandler = require('errorhandler')
const path = require('path')
const favicon = require('serve-favicon')
const translations = require('lib/translations')
const t = require('t-component')

const app = module.exports = express()

/**
 * Set `views` directory for module
 */

app.set('views', __dirname)

/**
 * Set `view engine` to `jade`.
 */

app.set('view engine', 'jade')

/**
 * middleware for favicon
 */

app.use(favicon(path.join(__dirname, '/assets/favicon.ico')))

/*
 * Register Models and Launch Mongoose
 */

require('lib/models')(app)

/**
 * Set `app` configure settings
 */

require('lib/setup')(app)

/*
 * PassportJS Auth Strategies and Routes
 */

require('lib/auth')(app)

/*
 * Load /ext folder
 */

app.use(require('lib/ext'))

/*
 * Twitter card routes
 */

app.use('/twitter-card', require('lib/twitter-card'))

/*
 * Facebook card routes
 */

app.use('/facebook-card', require('lib/facebook-card'))

/*
 * Load v2 api endpoints
 */

app.use('/api/v2', require('lib/api-v2/boot'))

/*
 * Load api endpoints
 */

app.use(require('lib/api/boot'))

/*
 * RSS routes
 */

app.use('/rss', require('lib/rss'))

/**
 * Load localization dictionaries to translation application
 */

translations.help(t)

/**
 * Init `t-component` component with parameter locale
 */

t.lang(config.locale)

/**
 * Load Styleguide
 */
if (config.env !== 'production') {
  app.use(require('lib/styleguide'))
}

/**
 * GET index page.
 */

app.use(require('lib/browser-update'))

app.use(require('lib/settings/boot'))
app.use(require('lib/admin/boot'))
app.use(require('lib/site/boot'))

app.use(require('lib/404'))

/**
 * Set native `express` error handler
 */

if ('development' === config.env) {
  // only use in development
  app.use(errorhandler())
}<commit_msg>fix js styles<commit_after>const path = require('path')
const express = require('express')
const errorhandler = require('errorhandler')
const favicon = require('serve-favicon')
const t = require('t-component')
const config = require('lib/config')
const translations = require('lib/translations')

const app = module.exports = express()

/**
 * Set `views` directory for module
 */

app.set('views', __dirname)

/**
 * Set `view engine` to `jade`.
 */

app.set('view engine', 'jade')

/**
 * middleware for favicon
 */

app.use(favicon(path.join(__dirname, '/assets/favicon.ico')))

/*
 * Register Models and Launch Mongoose
 */

require('lib/models')(app)

/**
 * Set `app` configure settings
 */

require('lib/setup')(app)

/*
 * PassportJS Auth Strategies and Routes
 */

require('lib/auth')(app)

/*
 * Load /ext folder
 */

app.use(require('lib/ext'))

/*
 * Twitter card routes
 */

app.use('/twitter-card', require('lib/twitter-card'))

/*
 * Facebook card routes
 */

app.use('/facebook-card', require('lib/facebook-card'))

/*
 * Load v2 api endpoints
 */

app.use('/api/v2', require('lib/api-v2/boot'))

/*
 * Load api endpoints
 */

app.use(require('lib/api/boot'))

/*
 * RSS routes
 */

app.use('/rss', require('lib/rss'))

/**
 * Load localization dictionaries to translation application
 */

translations.help(t)

/**
 * Init `t-component` component with parameter locale
 */

t.lang(config.locale)

/**
 * Load Styleguide
 */
if (config.env !== 'production') {
  app.use(require('lib/styleguide'))
}

/**
 * Front End Pages
 */

app.use(require('lib/browser-update'))
app.use(require('lib/settings/boot'))
app.use(require('lib/admin/boot'))
app.use(require('lib/site/boot'))
app.use(require('lib/404'))

/**
 * Set native `express` error handler
 */

if (config.env === 'development') {
  // only use in development
  app.use(errorhandler())
}
{'fraction_non_alphanumeric': 0.1956811516928819, 'fraction_numerical': 0.003199146894161557, 'mean_word_length': 3.9433465085639, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1308215', 'n_tokens_mistral': 1283, 'n_tokens_neox': 1256, 'n_words': 267}