<commit_before>const path = require('path')
const express = require('express')
const compression = require('compression')

const app = express()
const port = process.env.PORT || 3000

app.use(compression())
app.use(express.static(path.resolve(__dirname, 'public'), {
  maxAge: '7d',
  setHeaders: (res, filePath) => {
    const fileName = filePath.split('/').pop()
    if (fileName.match(/^(sw.js|index.html)$/)) {
      res.setHeader('Cache-Control', 'public, max-age=0')
    }
  },
}))
app.use((req, res) => res.sendFile(path.join(__dirname, 'public', 'index.html')))

app.listen(port)
<commit_msg>Minor refactor<commit_after>const path = require('path')
const express = require('express')
const compression = require('compression')

const app = express()
const port = process.env.PORT || 3000

app.use(compression())
app.use(express.static(path.resolve(__dirname, 'public'), {
  maxAge: '7d',
  setHeaders: (res, filePath) => {
    if (filePath.match(/(sw.js|index.html)$/)) {
      res.setHeader('Cache-Control', 'public, max-age=0')
    }
  },
}))

app.use((req, res) => res.sendFile(path.join(
  __dirname,
  'public',
  'index.html',
)))

app.listen(port)

{'fraction_non_alphanumeric': 0.1994840928632846, 'fraction_numerical': 0.010318142734307825, 'mean_word_length': 4.705882352941177, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '849193', 'n_tokens_mistral': 412, 'n_tokens_neox': 402, 'n_words': 75}