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
+28
View File
@@ -0,0 +1,28 @@
import { Client } from 'ssh2';
const conn = new Client();
conn.on('ready', () => {
console.log('=== 检查完整服务器日志 ===');
conn.exec('docker logs huishou-backend 2>&1 | tail -100', (err, stream) => {
if (err) { console.log('ERR:', err); conn.end(); return; }
let logs = '';
stream.on('data', (d) => logs += d.toString());
stream.on('close', () => {
console.log('服务器日志:', logs);
conn.end();
});
});
});
conn.on('error', (err) => {
console.log('连接错误:', err.message);
});
conn.connect({
host: 'hs.yifenbao.cn',
port: 22,
username: 'root',
password: 'Torch1112'
});