refactor: remove success logs and update server URL display

This commit is contained in:
himanshu8443
2025-06-30 15:22:21 +05:30
parent b1bbb4f8b5
commit b69db7409f
3 changed files with 19 additions and 19 deletions

View File

@@ -3,6 +3,7 @@ const cors = require("cors");
const path = require("path");
const fs = require("fs");
const { execSync } = require("child_process");
const os = require("os");
/**
* Local development server for testing providers
@@ -144,24 +145,28 @@ class DevServer {
}
start() {
// Get local IP address
const interfaces = os.networkInterfaces();
let localIp = "localhost";
for (const name of Object.keys(interfaces)) {
for (const iface of interfaces[name]) {
if (iface.family === "IPv4" && !iface.internal) {
localIp = iface.address;
break;
}
}
if (localIp !== "localhost") break;
}
this.app.listen(this.port, "0.0.0.0", () => {
console.log(`
🚀 Vega Providers Dev Server Started!
📡 Server URL: http://localhost:${this.port}
📱 Mobile URL: http://<your-ip>:${this.port}
📋 Available endpoints:
• GET /manifest.json - Provider manifest
• GET /dist/:provider/:file - Provider modules
• POST /build - Trigger rebuild
• GET /status - Server status
• GET /providers - List providers
• GET /health - Health check
📱 Mobile URL: http://${localIp}:${this.port}
💡 Usage:
1. Run 'node build.js' to build providers
2. Update vega app to use: http://localhost:${this.port}
1. Run 'npm run auto' to to start the dev server ☑️
2. Update vega app to use: http://${localIp}:${this.port}
3. Test your providers!
🔄 Auto-rebuild: POST to /build to rebuild after changes