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
+15
View File
@@ -0,0 +1,15 @@
const http = require('http');
http.get('http://localhost:8080', (res) => {
console.log('HTTP状态:', res.statusCode);
console.log('Content-Type:', res.headers['content-type']);
let data = '';
res.on('data', (chunk) => data += chunk);
res.on('end', () => {
console.log('页面内容长度:', data.length);
console.log('页面标题:', data.match(/<title>(.*?)<\/title>/)?.[1]);
});
}).on('error', (err) => {
console.log('访问失败:', err.message);
});