<commit_before>require('dotenv-extended').load();

const lagoonApiRoute = process.env.LAGOON_ROUTES.split(',').find(route => route.includes('api-'));
const envApiRoute = process.env.API;

module.exports = {
  publicRuntimeConfig: {
    API: envApiRoute || lagoonApiRoute,
    API_TOKEN: process.env.API_TOKEN,
  }
}<commit_msg>GOV-8 Fix errors when LAGOON_ROUTES is undefined<commit_after>require('dotenv-extended').load();

const lagoonApiRoute = process.env.LAGOON_ROUTES &&
  process.env.LAGOON_ROUTES.split(',').find(route => route.includes('api-'));
const envApiRoute = process.env.API;

module.exports = {
  publicRuntimeConfig: {
    API: envApiRoute || lagoonApiRoute,
    API_TOKEN: process.env.API_TOKEN,
  }
}
{'fraction_non_alphanumeric': 0.15138888888888888, 'fraction_numerical': 0.001388888888888889, 'mean_word_length': 5.324561403508772, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4481768', 'n_tokens_mistral': 260, 'n_tokens_neox': 256, 'n_words': 37}