<commit_before>'use strict'

var express = require('express');
var bodyParser = require('body-parser');
var request = require('request');
var Q = require('q');
var request = require('request');

var utilities = require('./utilities');
var factory = require('./factory');
var messenger = require('../bots/messenger.bot');

/**
 * Main entry point for the bot server
 *
 * @param botHandlers
 * @param actionHandlers
 * @param config
 */
function start(botHandlers, actionHandlers, config) {
  var port = process.env.PORT || 3000;
  var app = express();

  console.log('Starting server');

  addMiddleware(app);

  // remove these
  // addTestRoutes(app);

  // all bots go to this route
  app.post('/:bot', handleRequest(botHandlers, actionHandlers, config));

  // look up Express - app.all - figure out how to process FBM verification
    // should be able to see if it's a Get or Post

  // FB Messenger verification route
  app.get('/messenger', function(req, res) {
    messenger.verify(req, res);
  });<commit_msg>Change server to app.all<commit_after>'use strict'

var express = require('express');
var bodyParser = require('body-parser');
var request = require('request');
var Q = require('q');
var request = require('request');

var utilities = require('./utilities');
var factory = require('./factory');
var messenger = require('../bots/messenger.bot');

/**
 * Main entry point for the bot server
 *
 * @param botHandlers
 * @param actionHandlers
 * @param config
 */
function start(botHandlers, actionHandlers, config) {
  var port = process.env.PORT || 3000;
  var app = express();

  console.log('Starting server');

  addMiddleware(app);

  // remove these
  // addTestRoutes(app);

  // all bots go to this route
  // app.post('/:bot', handleRequest(botHandlers, actionHandlers, config));
  app.all('/:bot', handleRequest(botHandlers, actionHandlers, config));

  // look up Express - app.all - figure out how to process FBM verification
    // should be able to see if it's a Get or Post

  // FB Messenger verification route
  // app.get('/messenger', function(req, res) {
  //   messenger.verify(req, res);
  // });
{'fraction_non_alphanumeric': 0.15096108766994842, 'fraction_numerical': 0.003750586029067042, 'mean_word_length': 3.861047835990888, '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': '5353597', 'n_tokens_mistral': 653, 'n_tokens_neox': 618, 'n_words': 201}