<commit_before>const express = require('express')
const next = require('next')

const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
const proxy = require('http-proxy-middleware')

app.prepare()
  .then(() => {
    const server = express()

    server.use('/api', proxy('http://127.0.0.1:3001'))
    server.use('/auth', proxy('http://127.0.0.1:3001'))
    server.use('/ws', proxy('http://127.0.0.1:3001'))

    server.get('*', (req, res) => {
      return handle(req, res)
    })
<commit_msg>Add request logger<commit_after>const express = require('express')
const next = require('next')

const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
const proxy = require('http-proxy-middleware')
const logger = require('morgan')

app.prepare()
  .then(() => {
    const server = express()

    const logTarget = dev
      ? /^(?!\/_next\/on-demand-entries-ping).+/
      : '*'
    server.use(logTarget, logger('dev'))

    server.use('/api', proxy('http://127.0.0.1:3001'))
    server.use('/auth', proxy('http://127.0.0.1:3001'))
    server.use('/ws', proxy('http://127.0.0.1:3001'))

    server.get('*', (req, res) => {
      return handle(req, res)
    })

{'fraction_non_alphanumeric': 0.2172549019607843, 'fraction_numerical': 0.047058823529411764, 'mean_word_length': 3.5409252669039146, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '5942480', 'n_tokens_mistral': 463, 'n_tokens_neox': 429, 'n_words': 85}