<commit_before>const express = require('express');
const app = express();
const appInsights = require('applicationinsights');

const env = process.env.NODE_ENV || 'development';
const port = process.env.PORT ||
  (env === 'producton' || env == 'staging' ? 80 : 3000);

if (env === 'production') {
  appInsights.setup("128ce831-0196-468a-945d-9dcd34992fcf").start();
}

app.get('/', (_: any, res: any) => {
  // const filename = env === 'development' ? 'index.development' : 'index';
  res.sendFile(`${__dirname}/index.${env}.html`)
});

app.use('/app', express.static('app'));

app.use('/images', express.static('images'));<commit_msg>Use env variable for appinsights instrumentation key<commit_after>const express = require('express');
const app = express();
const appInsights = require('applicationinsights');

const env = process.env.NODE_ENV || 'development';
const port = process.env.PORT ||
  (env === 'producton' || env == 'staging' ? 80 : 3000);

if (env === 'production' && process.env.APP_INSIGHTS_INSTRUMENTATION_KEY) {
  appInsights.setup(process.env.APP_INSIGHTS_INSTRUMENTATION_KEY).start();
}

app.get('/', (_: any, res: any) => {
  // const filename = env === 'development' ? 'index.development' : 'index';
  res.sendFile(`${__dirname}/index.${env}.html`)
});

app.use('/app', express.static('app'));

app.use('/images', express.static('images'));
{'fraction_non_alphanumeric': 0.20983125458547322, 'fraction_numerical': 0.024944974321349962, 'mean_word_length': 5.403755868544601, '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': '6279084', 'n_tokens_mistral': 473, 'n_tokens_neox': 442, 'n_words': 88}