mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
12 lines
365 B
JavaScript
12 lines
365 B
JavaScript
export function createChatlabServeCommand({ serverDir, backendPort, nodeExecutable = process.execPath }) {
|
|
return {
|
|
command: nodeExecutable,
|
|
args: ['--watch', '--import', 'tsx', 'src/cli.ts', 'serve', '--port', String(backendPort)],
|
|
options: {
|
|
cwd: serverDir,
|
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
env: { ...process.env },
|
|
},
|
|
}
|
|
}
|