Initial commit: 小羚羚小程序 Axhub Make workspace.
Include xll-miniapp prototype, PRD resources, annotation directory sync, agent skills, and cloud publishing setup. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
15
vite-plugins/utils/httpUtils.ts
Normal file
15
vite-plugins/utils/httpUtils.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { networkInterfaces } from 'node:os';
|
||||
|
||||
export function getLocalIP(): string {
|
||||
const interfaces = networkInterfaces();
|
||||
|
||||
for (const nets of Object.values(interfaces)) {
|
||||
for (const net of nets || []) {
|
||||
if (net.family === 'IPv4' && !net.internal) {
|
||||
return net.address;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 'localhost';
|
||||
}
|
||||
Reference in New Issue
Block a user