<commit_before>const express = require('express');

const HealthcheckRouter = require('./routers/HealthcheckRouter');
const SchemasRouter = require('./routers/SchemasRouter');
const StatusRouter = require('./routers/StatusRouter');
const FunctionsRouter = require('./routers/FunctionsRouter');


const morgan = require('morgan');


const RedisStorage = require('../domain/storage/redis');
const SchemaResponse = require('./SchemaResponse');
const Sandbox = require('../domain/sandbox').Sandbox;

const app = express();

app.use(morgan('tiny'));
app.disable('x-powered-by');

app.set('memoryStorage', new RedisStorage());
app.set('sandbox', new Sandbox());

app.get('/', (req, res) => {
  new SchemaResponse(req, res, 'root')
    .json({
      name: 'Backstage functions',<commit_msg>Enable trust proxy property: https://expressjs.com/en/guide/behind-proxies.html<commit_after>const express = require('express');

const HealthcheckRouter = require('./routers/HealthcheckRouter');
const SchemasRouter = require('./routers/SchemasRouter');
const StatusRouter = require('./routers/StatusRouter');
const FunctionsRouter = require('./routers/FunctionsRouter');


const morgan = require('morgan');


const RedisStorage = require('../domain/storage/redis');
const SchemaResponse = require('./SchemaResponse');
const Sandbox = require('../domain/sandbox').Sandbox;

const app = express();

app.use(morgan('tiny'));
app.disable('x-powered-by');
app.enable('trust proxy');

app.set('memoryStorage', new RedisStorage());
app.set('sandbox', new Sandbox());

app.get('/', (req, res) => {
  new SchemaResponse(req, res, 'root')
    .json({
      name: 'Backstage functions',
{'fraction_non_alphanumeric': 0.1832429174201326, 'fraction_numerical': 0.0, 'mean_word_length': 5.80327868852459, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '7275838', 'n_tokens_mistral': 490, 'n_tokens_neox': 476, 'n_words': 103}