const http = require('http'); const port = 8080; const status = { service: 'running', bitcoinNode: 'not connected', wallet: 'not configured', labels: 0, transactions: 0, lastScan: 'never' }; const server = http.createServer((req, res) => { if (req.url === '/api/status') { res.writeHead(200, { 'Content-Type': 'application/json', }); res.end(JSON.stringify(status)); return; } res.writeHead(404); res.end('Not found'); }); server.listen(port, () => { console.log(`Status API listening on port ${port}`); });