Initial commit - full huishou project

This commit is contained in:
jiapengyu
2026-07-27 14:07:26 +08:00
commit 60790ad1b3
39127 changed files with 5989265 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
import { Client } from 'ssh2';
const conn = new Client();
conn.on('ready', () => {
console.log('=== 检查站点数据 ===\n');
conn.exec('docker exec huishou-backend ls -la /app/data/', (err, stream) => {
if (err) { console.log('ERR:', err); conn.end(); return; }
let output = '';
stream.on('data', (d) => output += d.toString());
stream.on('close', () => {
console.log('data目录:');
console.log(output);
conn.exec('docker exec huishou-backend cat /app/data/stations.json', (err, stream2) => {
if (err) { console.log('ERR:', err); conn.end(); return; }
let output2 = '';
stream2.on('data', (d) => output2 += d.toString());
stream2.on('close', () => {
console.log('\n站点数据:');
console.log(output2);
conn.end();
});
});
});
});
});
conn.on('error', (err) => {
console.log('连接错误:', err.message);
});
conn.connect({
host: 'hs.yifenbao.cn',
port: 22,
username: 'root',
password: 'Torch1112'
});