<commit_before>'use strict'

const fs = require('fs')
const http = require('http')
const https = require('https')
const path = require('path')
const tcp = require('net')
const tls = require('tls')

const httpHandler = require('./http-handler')
const tcpHandler = require('./tcp-handler')

const config = {
  httpPort: +(process.env.HTTP_PORT || 8082),
  httpsPort: +(process.env.HTTPS_PORT || 8443),
  tcpBodyPort: +(process.env.TCP_BODY_PORT || 9000),
  tlsBodyPort: +(process.env.TLS_BODY_PORT || 9001),
  tcpDelayPort: +(process.env.TCP_BODY_PORT || 9002),
  tlsDelayPort: +(process.env.TLS_BODY_PORT || 9003)

}

const tlsOptions = {
  key: fs.readFileSync(path.join(__dirname, 'tls', 'key.pem')),
  cert: fs.readFileSync(path.join(__dirname, 'tls', 'cert.pem'))
}

const httpServer = http.createServer(httpHandler.handleRequest)
httpServer.listen(config.httpPort, () => {
  console.log(`HTTP server started on ${config.httpPort}`)
})

const httpsServer = https.createServer(tlsOptions, httpHandler.handleRequest)
httpsServer.listen(config.httpsPort, () => {
  console.log(`HTTPS server started on ${config.httpsPort}`)
})

const tcpBodyServer = tcp.createServer(tcpHandler.handleBodyRequest)
tcpBodyServer.listen(config.tcpBodyPort, () => {
  console.log(`TCP body server started on ${config.tcpBodyPort}`)
})

const tlsBodyServer = tls.createServer(tlsOptions, tcpHandler.handleBodyRequest)
tlsBodyServer.listen(config.tlsBodyPort, () => {
  console.log(`TLS body server started on ${config.tlsBodyPort}`)
})
const tcpDelayServer = tcp.createServer(tcpHandler.handleDelayRequest)
tcpDelayServer.listen(config.tcpDelayPort, () => {
  console.log(`Tcp delay server started on ${config.tcpDelayPort}`)
})

const tlsDelayServer = tls.createServer(tlsOptions, tcpHandler.handleDelayRequest)
tlsDelayServer.listen(config.tlsDelayPort, () => {
  console.log(`TLS delay server started on ${config.tlsDelayPort}`)
})<commit_msg>Fix formatting<commit_after>'use strict'

const fs = require('fs')
const http = require('http')
const https = require('https')
const path = require('path')
const tcp = require('net')
const tls = require('tls')

const httpHandler = require('./http-handler')
const tcpHandler = require('./tcp-handler')

const config = {
  httpPort: +(process.env.HTTP_PORT || 8082),
  httpsPort: +(process.env.HTTPS_PORT || 8443),
  tcpBodyPort: +(process.env.TCP_BODY_PORT || 9000),
  tlsBodyPort: +(process.env.TLS_BODY_PORT || 9001),
  tcpDelayPort: +(process.env.TCP_BODY_PORT || 9002),
  tlsDelayPort: +(process.env.TLS_BODY_PORT || 9003)

}

const tlsOptions = {
  key: fs.readFileSync(path.join(__dirname, 'tls', 'key.pem')),
  cert: fs.readFileSync(path.join(__dirname, 'tls', 'cert.pem'))
}

const httpServer = http.createServer(httpHandler.handleRequest)
httpServer.listen(config.httpPort, () => {
  console.log(`HTTP server started on ${config.httpPort}`)
})

const httpsServer = https.createServer(tlsOptions, httpHandler.handleRequest)
httpsServer.listen(config.httpsPort, () => {
  console.log(`HTTPS server started on ${config.httpsPort}`)
})

const tcpBodyServer = tcp.createServer(tcpHandler.handleBodyRequest)
tcpBodyServer.listen(config.tcpBodyPort, () => {
  console.log(`TCP body server started on ${config.tcpBodyPort}`)
})

const tlsBodyServer = tls.createServer(tlsOptions, tcpHandler.handleBodyRequest)
tlsBodyServer.listen(config.tlsBodyPort, () => {
  console.log(`TLS body server started on ${config.tlsBodyPort}`)
})

const tcpDelayServer = tcp.createServer(tcpHandler.handleDelayRequest)
tcpDelayServer.listen(config.tcpDelayPort, () => {
  console.log(`TCP delay server started on ${config.tcpDelayPort}`)
})

const tlsDelayServer = tls.createServer(tlsOptions, tcpHandler.handleDelayRequest)
tlsDelayServer.listen(config.tlsDelayPort, () => {
  console.log(`TLS delay server started on ${config.tlsDelayPort}`)
})
{'fraction_non_alphanumeric': 0.15160955347871236, 'fraction_numerical': 0.012461059190031152, 'mean_word_length': 6.256120527306968, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '82152', 'n_tokens_mistral': 1285, 'n_tokens_neox': 1235, 'n_words': 235}