Skip to content

Commit d59411c

Browse files
committed
build: rename webProcess to nodeProcess and update spawn command
1 parent 0463221 commit d59411c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

scripts/base.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ import { rimraf } from 'rimraf'
66
const __dirname = path.dirname(fileURLToPath(import.meta.url))
77
const isProd = process.env.NODE_ENV === 'production'
88
const isDev = process.env.NODE_ENV === 'local'
9-
let webProcess = null
9+
let nodeProcess = null
10+
11+
if (isDev) {
12+
spawn('npx', ['-y', '@my-mcp-hub/node-mcp-server', 'web'], {
13+
stdio: 'inherit',
14+
})
15+
}
1016

1117
/** @type {import('esbuild').BuildOptions} */
1218
export const config = {
@@ -47,10 +53,10 @@ const after = async result => {
4753
} else {
4854
console.error('❌ Rebuild failed')
4955
}
50-
if (webProcess) {
51-
webProcess.kill('SIGINT')
56+
if (nodeProcess) {
57+
nodeProcess.kill('SIGINT')
5258
}
53-
webProcess = spawn('npx', ['-y', '@my-mcp-hub/node-mcp-server', 'web'], {
59+
nodeProcess = spawn('tsx', ['./src/index.ts'], {
5460
stdio: 'inherit',
5561
})
5662
}

0 commit comments

Comments
 (0)