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

// Search for router.post or app.post or app.get related to vouchers
const regex = /app\.(post|get|put|delete)\("[^"]*vouchers/g;
let match;
while ((match = regex.exec(content)) !== null) {
  console.log(`\nFound match at ${match.index}:`);
  console.log(content.substring(match.index - 50, match.index + 200));
}
