<commit_before>
const { WebsiteApi } = require("./scripts/website.js");
const { printJSON, decrypt } = require('./scripts/decrypt.js');

const compression = require('compression');
const express = require('express');
const vhost = require('vhost');
const fs = require("fs");
const app = express();

app.use(compression());
app.use(express.static(__dirname + "/public/"));
app.use(require('body-parser').json());
app.use(require('cors')());

const json = JSON.parse(fs.readFileSync('./private/domains.json', 'utf8'));
json.domains.forEach(entry => {
  app.use(vhost(entry.domain, express.static(__dirname + entry.folder))); 
  console.log(entry.domain, __dirname + entry.folder);   
});

const server = app.listen(3000, () => {
  const key = process.argv[process.argv.length - 1];
  const json = fs.readFileSync('private/credentials.json', 'utf8');
  const dataNoInvalidChars = json.toString().replace(/^\uFEFF/, '');
  const auth = JSON.parse(dataNoInvalidChars);
  auth.username = decrypt(key, auth.username);
  auth.password = decrypt(key, auth.password);
  auth.host = decrypt(key, auth.host);

  printJSON(auth);

  const websiteAPI = new WebsiteApi();
  websiteAPI.setup(auth);
  websiteAPI.use(app, "/");
});<commit_msg>removing console log<commit_after>
const { WebsiteApi } = require("./scripts/website.js");
const { printJSON, decrypt } = require('./scripts/decrypt.js');

const compression = require('compression');
const express = require('express');
const vhost = require('vhost');
const fs = require("fs");
const app = express();

app.use(compression());
app.use(express.static(__dirname + "/public/"));
app.use(require('body-parser').json());
app.use(require('cors')());

const json = JSON.parse(fs.readFileSync('./private/domains.json', 'utf8'));
json.domains.forEach(entry => {
  app.use(vhost(entry.domain, express.static(__dirname + entry.folder)));    
});

const server = app.listen(3000, () => {
  const key = process.argv[process.argv.length - 1];
  const json = fs.readFileSync('private/credentials.json', 'utf8');
  const dataNoInvalidChars = json.toString().replace(/^\uFEFF/, '');
  const auth = JSON.parse(dataNoInvalidChars);
  
  auth.username = decrypt(key, auth.username);
  auth.password = decrypt(key, auth.password);
  auth.host = decrypt(key, auth.host);

  printJSON(auth);

  const websiteAPI = new WebsiteApi();
  websiteAPI.setup(auth);
  websiteAPI.use(app, "/");
});
{'fraction_non_alphanumeric': 0.1919401744910677, 'fraction_numerical': 0.005816368923971749, 'mean_word_length': 5.190231362467866, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2528206', 'n_tokens_mistral': 778, 'n_tokens_neox': 754, 'n_words': 143}