<commit_before>import app from './server';
import http from 'http';

const server = http.createServer(app);

let currentApp = app;

server.listen(process.env.PORT || 3000, error => {
  if (error) {
    console.log(error);
  }

  console.log('🚀 started');
});

if (module.hot) {
  console.log('✅  Server-side HMR Enabled!');

  const noErrors = () => {
    try {
      require('./server').default;
    } catch (error) {
      console.error(error);
      return false;
    }
    return true;
  };

  module.hot.accept('./server', () => {
    if (noErrors()) {
      console.log('🔁  HMR Reloading `./server`...');
      server.removeListener('request', currentApp);
      const newApp = require('./server').default;
      server.on('request', newApp);
      currentApp = newApp;
    }
  });
}<commit_msg>Change import to require<commit_after>import http from 'http';

let app = require('./server').default;

const server = http.createServer(app);

let currentApp = app;

server.listen(process.env.PORT || 3000, error => {
  if (error) {
    console.log(error);
  }

  console.log('🚀 started');
});

if (module.hot) {
  console.log('✅  Server-side HMR Enabled!');

  const noErrors = () => {
    try {
      require('./server.js').default;
    } catch (error) {
      console.error(error);
      return false;
    }
    return true;
  };

  module.hot.accept('./server', () => {
    if (noErrors()) {
      console.log('🔁  HMR Reloading `./server`...');
      server.removeListener('request', currentApp);
      app = require('./server').default;
      server.on('request', app);
      currentApp = app;
    }
  });
}
{'fraction_non_alphanumeric': 0.18784872907625544, 'fraction_numerical': 0.0049597024178549285, 'mean_word_length': 2.7534883720930234, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5322495', 'n_tokens_mistral': 540, 'n_tokens_neox': 530, 'n_words': 111}