INNER CODE UNIT · JavaScript
deleteJobFile
JoasASantos/NeuroSploit · web/server.js:76
function deleteJobFile(id) { try { fs.unlinkSync(jobFile(id)); } catch { /* gone already */ } }
const PUBLIC_DIR = path.join(WEB_DIR, 'public');
function findBinary() {
const candidates = [
path.join(ROOT, 'neurosploit-rs', 'target', 'release', 'neurosploit'),
path.join(ROOT, 'neurosploit-rs', 'target', 'debug', 'neurosploit'),
];
for (const c of candidates) {
if (fs.existsSync(c)) return c;
}
return null;
}
const BIN = findBinary();
const PORT = Number(process.env.NEUROSPLOIT_WEB_PORT || process.env.PORT || 4173);