<commit_before>/*jshint node:true */
if (process.env.NODE_ENV === 'production' || process.env.NEW_RELIC_LICENSE_KEY) {
  require('newrelic');
}

var express = require('express'),
  morgan = require('morgan'),
  compress = require('compression'),
  cors = require('cors'),
  url = require('url'),
  requestp = require('./requestp'),
  u = require('underscore'),
  JSON3 = require('json3'),
  snippets = require('./snippets');

var app = express();

// logging
if (process.env.NODE_ENV !== 'test') {
  app.use(morgan('combined'));
}
app.use(compress());
app.use(cors());
app.use(express['static'](__dirname + '/..'));


function isValidJson(str) {<commit_msg>allow CORS pre-flight requests to be cached<commit_after>/*jshint node:true */
if (process.env.NODE_ENV === 'production' || process.env.NEW_RELIC_LICENSE_KEY) {
  require('newrelic');
}

var express = require('express'),
  morgan = require('morgan'),
  compress = require('compression'),
  cors = require('cors'),
  url = require('url'),
  requestp = require('./requestp'),
  u = require('underscore'),
  JSON3 = require('json3'),
  snippets = require('./snippets');

var app = express();

// logging
if (process.env.NODE_ENV !== 'test') {
  app.use(morgan('combined'));
}
app.use(compress());
app.use(cors({
  maxAge: 60 * 60 * 24 // one day
}));
app.use(express['static'](__dirname + '/..'));


function isValidJson(str) {
{'fraction_non_alphanumeric': 0.2114409847936278, 'fraction_numerical': 0.00724112961622013, 'mean_word_length': 4.905982905982906, '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': '851540', 'n_tokens_mistral': 482, 'n_tokens_neox': 467, 'n_words': 90}