<commit_before>/*jslint node: true, unparam: true, nomen: true, vars: true*/
'use strict';

var isProduction = process.env.NODE_ENV === 'production';

var mongoose = require('mongoose').connect(process.env.VDUMKA_MONGO_CONNECTION_STRING);
var models = require('./models');
var books = mongoose.model('book', models.book, 'books');
var articles = mongoose.model('article', models.article, 'articles');
var cachestamps = mongoose.model('cachestamps', models.cachestamps);

var express = require('express');
var app = express();

app.set('port', process.env.PORT || 3000);

app.use(require('body-parser')());
app.use(require('compression')());
app.use(express.static(__dirname + (isProduction ? '/../public' : '/../src')));
app.use(function (req, res, next) {
    req.db = {
        books: books,
        articles: articles,
        cachestamps: cachestamps
    };
    next();
});

app.use('/api/books', require('./routes/books'));
app.use('/api/blog', require('./routes/blog'));
<commit_msg>Update app.js<commit_after>/*jslint node: true, unparam: true, nomen: true, vars: true*/
'use strict';

var isProduction = process.env.NODE_ENV === 'production';

var mongoose = require('mongoose').connect(process.env.VDUMKA_MONGO_CONNECTION_STRING);
var models = require('./models');
var books = mongoose.model('book', models.book, 'books');
var articles = mongoose.model('article', models.article, 'articles');
var cachestamps = mongoose.model('cachestamps', models.cachestamps);

var express = require('express');
var app = express();

app.set('port', process.env.PORT || 3000);
app.use(require('body-parser')());
app.use(require('compression')());
app.use(express.static(__dirname + (isProduction ? '/../public' : '/../src')));
app.use(function (req, res, next) {
    req.db = {
        books: books,
        articles: articles,
        cachestamps: cachestamps
    };
    next();
});

app.use('/api/books', require('./routes/books'));
app.use('/api/blog', require('./routes/blog'));

{'fraction_non_alphanumeric': 0.20182094081942337, 'fraction_numerical': 0.004046535154274153, 'mean_word_length': 4.75, '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': '3339004', 'n_tokens_mistral': 639, 'n_tokens_neox': 634, 'n_words': 133}