Build customizable SSH portfolio MVP
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
import net from 'node:net';
|
||||
const port = Number(process.env.NOTIFICATION_PORT || 7777);
|
||||
const socket = net.createConnection({ host: '127.0.0.1', port }, () => console.log(`Listening for SSH portfolio notifications on localhost:${port}`));
|
||||
socket.on('data', data => data.toString().split('\n').filter(Boolean).forEach(line => { try { const item = JSON.parse(line); if (item.message) console.log(`\n[ssh-portfolio] ${item.message}`); } catch {} }));
|
||||
socket.on('error', err => { console.error(`Unable to connect to notification server: ${err.message}`); process.exitCode = 1; });
|
||||
Reference in New Issue
Block a user