<commit_before>'use strict';

const ldapConfig = require('./ldap');

const keys = process.env.REST_ON_COUCH_APP_KEYS;
if (keys === '') {
  throw new Error(
    'There must be at least one app key defined in REST_ON_COUCH_APP_KEYS'
  );
}
const appKeys = keys.split(',');

const origins = process.env.REST_ON_COUCH_ORIGINS;
if (origins === '') {
  throw new Error(
    'There must be at least one origin defined in REST_ON_COUCH_ORIGINS'
  );
}
const allowedOrigins = origins.split(',');

const adminUsers = process.env.REST_ON_COUCH_ADMIN_USERS;
let administrators = ['<EMAIL>'];
if (adminUsers !== '') {
  administrators.push(...adminUsers.split(','));
}

const proxyPrefix = process.env.REST_ON_COUCH_PROXY_PATH || '';

module.exports = {
  allowedOrigins, // ['https://server1.example.com', 'https://server2.example.com', ...]
  keys: appKeys, // ['key1', 'key2', ...]
  administrators, // ['<EMAIL>', '<EMAIL>', ...]
  port: 3000,
  url: 'http://couchdb:5984',
  username: 'rest-on-couch',
  password: process.env.COUCHDB_ROC_SERVER_PASSWORD,
  logLevel: 'FATAL',
  proxyPrefix: proxyPrefix + '/roc/',
  publicAddress: allowedOrigins[0],
  auth: {
    ldap: ldapConfig,
    google: {
      clientID: "CLIENT_ID.apps.googleusercontent.com",
      clientSecret: "THE_SECRET"
    },
    // do not disable couchdb login. You can enable "showLogin" if necessary
    couchdb: {
      showLogin: false,
      title: "Login with a Cheminfo account"
    }
  },

  // Default database rights
  // Any logged in user can create documents. Only owners can read and write their own documents
  rights: {
    read: [],
    write: [],
    create: ['anyuser']
  }
};
<commit_msg>Update config.js<commit_after>'use strict';

#const ldapConfig = require('./ldap');

const keys = process.env.REST_ON_COUCH_APP_KEYS;
if (keys === '') {
  throw new Error(
    'There must be at least one app key defined in REST_ON_COUCH_APP_KEYS'
  );
}
const appKeys = keys.split(',');

const origins = process.env.REST_ON_COUCH_ORIGINS;
if (origins === '') {
  throw new Error(
    'There must be at least one origin defined in REST_ON_COUCH_ORIGINS'
  );
}
const allowedOrigins = origins.split(',');

const adminUsers = process.env.REST_ON_COUCH_ADMIN_USERS;
let administrators = ['<EMAIL>'];
if (adminUsers !== '') {
  administrators.push(...adminUsers.split(','));
}

const proxyPrefix = process.env.REST_ON_COUCH_PROXY_PATH || '';

module.exports = {
  allowedOrigins, // ['https://server1.example.com', 'https://server2.example.com', ...]
  keys: appKeys, // ['key1', 'key2', ...]
  administrators, // ['<EMAIL>', '<EMAIL>', ...]
  port: 3000,
  url: 'http://couchdb:5984',
  username: 'rest-on-couch',
  password: <PASSWORD>,
  logLevel: 'FATAL',
  proxyPrefix: proxyPrefix + '/roc/',
  publicAddress: allowedOrigins[0],
  auth: {
#    ldap: ldapConfig,
#    google: {
#      clientID: "CLIENT_ID.apps.googleusercontent.com",
#      clientSecret: "THE_SECRET"
#    },
    // do not disable couchdb login. You can enable "showLogin" if necessary
    couchdb: {
      showLogin: true,
      title: "Login with a Cheminfo account"
    }
  },

  // Default database rights
  // Any logged in user can create documents. Only owners can read and write their own documents
  rights: {
    read: [],
    write: [],
    create: ['anyuser']
  }
};

{'fraction_non_alphanumeric': 0.1584666465439179, 'fraction_numerical': 0.00784787201931784, 'mean_word_length': 3.5710344827586207, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 4, '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': '5422027', 'n_tokens_mistral': 1179, 'n_tokens_neox': 1160, 'n_words': 277}