<commit_before>/* eslint-disable no-console */

require('trace');
require('clarify');
const hapi = require('hapi');
const helperFunctions = require('./auth-helpers');
const plugins = require('./plugins');
const routes = require('./routes');
const wsServer = require('./ws-server');
const database = require('./database');

const server = new hapi.Server();
server.connection({
  host: process.env.API_SERVER_HOSTNAME,
  port: process.env.API_SERVER_PORT,
});

server.register(plugins, (err) => {
  if (err) {
    console.log(err);
  }

  /**
   * JWT middleware validates token on each /graphql request
   * User object with permissions returned from validateToken function
   */
  server.auth.strategy('jwt', 'jwt',
    {
      key: process.env.API_JWT_SECRET,
      validateFunc: helperFunctions.validateToken,<commit_msg>remove trace and clarify<commit_after>/* eslint-disable no-console */

const hapi = require('hapi');
const helperFunctions = require('./auth-helpers');
const plugins = require('./plugins');
const routes = require('./routes');
const wsServer = require('./ws-server');
const database = require('./database');

const server = new hapi.Server();
server.connection({
  host: process.env.API_SERVER_HOSTNAME,
  port: process.env.API_SERVER_PORT,
});

server.register(plugins, (err) => {
  if (err) {
    console.log(err);
  }

  /**
   * JWT middleware validates token on each /graphql request
   * User object with permissions returned from validateToken function
   */
  server.auth.strategy('jwt', 'jwt',
    {
      key: process.env.API_JWT_SECRET,
      validateFunc: helperFunctions.validateToken,
{'fraction_non_alphanumeric': 0.15052436767427513, 'fraction_numerical': 0.0, 'mean_word_length': 4.266233766233766, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5383516', 'n_tokens_mistral': 487, 'n_tokens_neox': 485, 'n_words': 118}