Implement auto-open feature for browser launch on server start
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import open from "open";
|
||||
import { resolve, dirname } from "path";
|
||||
import { spawnPromise } from "spawn-rx";
|
||||
import { fileURLToPath } from "url";
|
||||
@@ -99,6 +100,9 @@ async function main() {
|
||||
|
||||
if (serverOk) {
|
||||
try {
|
||||
if (!process.env.MCP_AUTO_OPEN_DISABLED) {
|
||||
open(`http://localhost:${CLIENT_PORT}`);
|
||||
}
|
||||
await spawnPromise("node", [inspectorClientPath], {
|
||||
env: { ...process.env, PORT: CLIENT_PORT },
|
||||
signal: abort.signal,
|
||||
|
||||
Reference in New Issue
Block a user