<commit_before>#
# Main API Server
#

restify = require 'restify'
chalk = require 'chalk'

newrelic = require './helpers/newrelic'
exceptionHandler = require './helpers/exceptionhandler'
logger = require './helpers/logger'

app = module.exports = restify.createServer()
listenHost = process.env.HOST or process.env.VCAP_APP_HOST or "0.0.0.0"
listenPort = process.env.PORT or process.env.VCAP_APP_PORT or 8080

#
# Applying Restify built-in plugins and other helpers
#

# Restify workaround for cURL
app.pre restify.pre.userAgentConnection()<commit_msg>Move Newrelic to the top<commit_after>#
# Main API Server
#
# Newrelic should be on the top
newrelic = require './helpers/newrelic'

restify = require 'restify'
chalk = require 'chalk'

exceptionHandler = require './helpers/exceptionhandler'
logger = require './helpers/logger'

app = module.exports = restify.createServer()
listenHost = process.env.HOST or process.env.VCAP_APP_HOST or "0.0.0.0"
listenPort = process.env.PORT or process.env.VCAP_APP_PORT or 8080

#
# Applying Restify built-in plugins and other helpers
#

# Restify workaround for cURL
app.pre restify.pre.userAgentConnection()
{'fraction_non_alphanumeric': 0.10723626852659111, 'fraction_numerical': 0.013949433304272014, 'mean_word_length': 4.857142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '304068', 'n_tokens_mistral': 379, 'n_tokens_neox': 374, 'n_words': 103}