<commit_before>if (typeof process.env.NEW_RELIC_LICENSE_KEY === 'string') {
    require('newrelic');
}

var compression = require('compression');
var express = require('express');
var path = require('path');
var proxy = require('express-http-proxy');
var url = require('url');
var webpackDevMiddleware = require('webpack-dev-middleware');
var webpack = require('webpack');

var handler = require('./handler');
var log = require('./log');
var routes = require('./routes.json');

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

// Create server
var app = express();
app.disable('x-powered-by');

// Block POST & PUT requests in production
if (isProduction) {
    app.use(function (req, res, next) {
        if (req.method === 'GET') return next();
        if (req.method === 'OPTIONS') return next();
        if (req.method === 'HEAD') return next();

        res.writeHead(405, {'content-type' : 'application/json'});
        res.end('{"error": "Method not allowed"}');
    });
}

// Server setup
app.use(log());
app.use(compression());
if (isProduction) {
    app.use(express.static(path.resolve(__dirname, '../build'), {
        lastModified: true,<commit_msg>Use `strong` etag for build files<commit_after>if (typeof process.env.NEW_RELIC_LICENSE_KEY === 'string') {
    require('newrelic');
}

var compression = require('compression');
var express = require('express');
var path = require('path');
var proxy = require('express-http-proxy');
var url = require('url');
var webpackDevMiddleware = require('webpack-dev-middleware');
var webpack = require('webpack');

var handler = require('./handler');
var log = require('./log');
var routes = require('./routes.json');

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

// Create server
var app = express();
app.disable('x-powered-by');

// Block POST & PUT requests in production
if (isProduction) {
    app.use(function (req, res, next) {
        if (req.method === 'GET') return next();
        if (req.method === 'OPTIONS') return next();
        if (req.method === 'HEAD') return next();

        res.writeHead(405, {'content-type' : 'application/json'});
        res.end('{"error": "Method not allowed"}');
    });
}

// Server setup
app.use(log());
app.use(compression());
if (isProduction) {
    app.use(express.static(path.resolve(__dirname, '../build'), {
        etag: 'strong',
        lastModified: true,
{'fraction_non_alphanumeric': 0.19011725293132328, 'fraction_numerical': 0.002512562814070352, 'mean_word_length': 4.040084388185654, 'pattern_counts': {'":': 2, '<': 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': '2433653', 'n_tokens_mistral': 723, 'n_tokens_neox': 712, 'n_words': 184}