<commit_before>const commandLineArgs = require('command-line-args');
const childProcess = require('child_process');

function launchPolyserve(isDev) {
  const spawn = childProcess.spawn;

  const apiPath = process.env.API || 'http://localhost:3000/';
  const options = [
    'serve',
    '--compile=never',
    '--proxy-path=api',
    `--proxy-target=${apiPath}`];
  if (!isDev) {
    options.push('--root=build/esm-bundled');
  }
  const prc = spawn('polymer', options);

  prc.stdout.setEncoding('utf8');
  prc.stdout.on('data', (data) => {
    const str = data.toString();
    const lines = str.split(/(\r?\n)/g);
    console.log(lines.join(''));
  });

  prc.on('close', (code) => {
    console.log(`process exit code ${code}`);
  });<commit_msg>Change hostname to 0.0.0.0 for Docker<commit_after>const commandLineArgs = require('command-line-args');
const childProcess = require('child_process');

function launchPolyserve(isDev) {
  const spawn = childProcess.spawn;

  const apiPath = process.env.API || 'http://localhost:3000/';
  const options = [
    'serve',
    '--hostname=0.0.0.0',
    '--compile=never',
    '--proxy-path=api',
    `--proxy-target=${apiPath}`];
  if (!isDev) {
    options.push('--root=build/esm-bundled');
  }
  const prc = spawn('polymer', options);

  prc.stdout.setEncoding('utf8');
  prc.stdout.on('data', (data) => {
    const str = data.toString();
    const lines = str.split(/(\r?\n)/g);
    console.log(lines.join(''));
  });

  prc.on('close', (code) => {
    console.log(`process exit code ${code}`);
  });
{'fraction_non_alphanumeric': 0.2103225806451613, 'fraction_numerical': 0.011612903225806452, 'mean_word_length': 3.602373887240356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1575937', 'n_tokens_mistral': 551, 'n_tokens_neox': 541, 'n_words': 94}