@next-open-ai/openbot 0.1.3 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gateway/server.js +3 -3
- package/package.json +1 -1
package/dist/gateway/server.js
CHANGED
|
@@ -100,13 +100,13 @@ export async function startGatewayServer(port = 38080) {
|
|
|
100
100
|
const backendPort = await findAvailablePort(38081);
|
|
101
101
|
console.log(`Found available port for Desktop Server: ${backendPort}`);
|
|
102
102
|
setBackendBaseUrl(`http://localhost:${backendPort}`);
|
|
103
|
-
// 2. Start Desktop Server
|
|
103
|
+
// 2. Start Desktop Server(从包根目录找 dist/server,npm 全局安装时也能启动)
|
|
104
104
|
let backendProcess = null;
|
|
105
|
-
const serverPath = join(
|
|
105
|
+
const serverPath = join(PACKAGE_ROOT, "dist", "server", "main.js");
|
|
106
106
|
if (existsSync(serverPath)) {
|
|
107
107
|
console.log(`Spawning Desktop Server at ${serverPath}...`);
|
|
108
108
|
backendProcess = spawn("node", [serverPath], {
|
|
109
|
-
cwd:
|
|
109
|
+
cwd: PACKAGE_ROOT,
|
|
110
110
|
env: { ...process.env, PORT: backendPort.toString() },
|
|
111
111
|
stdio: ["ignore", "pipe", "pipe"], // Pipe stdout/stderr to capture logs
|
|
112
112
|
});
|
package/package.json
CHANGED