fix(cli): start web dev backend with start command

This commit is contained in:
digua committed 2026-05-30 14:19:42 +08:00
1 parent 0e03295258
commit 3a8f61fdf0
8 files changed
+41 -21

No files matched your search

+12 -2
View File
@@ -1,7 +1,17 @@
export function createChatlabServeCommand({ serverDir, backendPort, nodeExecutable = process.execPath }) {
export function createChatlabStartCommand({ serverDir, backendPort, nodeExecutable = process.execPath }) {
return {
command: nodeExecutable,
args: ['--watch', '--import', 'tsx', 'src/cli.ts', 'serve', '--port', String(backendPort)],
args: [
'--watch',
'--import',
'tsx',
'src/cli.ts',
'start',
'--headless',
'--no-open',
'--port',
String(backendPort),
],
options: {
cwd: serverDir,
stdio: ['ignore', 'pipe', 'pipe'],