Files
ChatLab/scripts/dev-server-command.mjs
T

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 },
},
}
}