<commit_before>import { processCommand } from './cmd.js';
import { startServer } from './server.js';

main ();

/**
 * Process command line to start server.
 */
function main (): void {
  const command = processCommand (process.argv.slice (2));
  if (command.exit) {
    process.exit (command.code);
  }

  const port = Number (process.env.PORT) || command.port;
  const uri = command.db === 'mongodb' ?
    process.env.MONGODB_URI || 'mongodb://localhost:27017/pollster' : '';
  startServer (port, uri);
}<commit_msg>server: add database using log message<commit_after>import { processCommand } from './cmd.js';
import { startServer } from './server.js';

main ();

/**
 * Process command line to start server.
 */
function main (): void {
  const command = processCommand (process.argv.slice (2));
  if (command.exit) {
    process.exit (command.code);
  }

  const port = Number (process.env.PORT) || command.port;
  const uri = command.db === 'mongodb' ?
    process.env.MONGODB_URI || 'mongodb://localhost:27017/pollster' : '';
  if (uri) {
    if (process.env.MONGODB_URI) {
      console.log ('INFO Using production database');
    } else {
      console.log ('INFO Using local database');
    }
  }
  startServer (port, uri);
}
{'fraction_non_alphanumeric': 0.16275303643724695, 'fraction_numerical': 0.009716599190283401, 'mean_word_length': 3.4301075268817205, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4295139', 'n_tokens_mistral': 403, 'n_tokens_neox': 389, 'n_words': 102}