const fs = require('fs');
const content = fs.readFileSync('./dist/server.cjs', 'utf8');

function findMatches(term) {
  let idx = 0;
  console.log(`=== Matches for "${term}" ===`);
  while (true) {
    idx = content.indexOf(term, idx);
    if (idx === -1) break;
    console.log(content.substring(Math.max(0, idx - 100), Math.min(content.length, idx + 200)));
    console.log('------------------');
    idx += term.length;
  }
}

findMatches("rekam");
findMatches("sapu");
findMatches("notice");
