mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
22 lines
453 B
JavaScript
22 lines
453 B
JavaScript
export function createChatlabStartCommand({ serverDir, backendPort, nodeExecutable = process.execPath }) {
|
|
return {
|
|
command: nodeExecutable,
|
|
args: [
|
|
'--watch',
|
|
'--import',
|
|
'tsx',
|
|
'src/cli.ts',
|
|
'start',
|
|
'--headless',
|
|
'--no-open',
|
|
'--port',
|
|
String(backendPort),
|
|
],
|
|
options: {
|
|
cwd: serverDir,
|
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
env: { ...process.env },
|
|
},
|
|
}
|
|
}
|