use bun for default engine

This commit is contained in:
2025-11-28 01:01:51 +08:00
parent fdb3a1f4d1
commit 01c253e553
3 changed files with 83 additions and 5 deletions

View File

@@ -55,6 +55,7 @@ program
.option('-n, --name <name>', '服务名称', 'assistant-server')
.option('-p, --port <port>', '服务端口')
.option('-s, --start', '是否启动服务')
.option('-e, --interpreter <interpreter>', '指定使用的解释器', 'bun')
.option('-i, --home', 'home目录')
.action(async (options) => {
// console.log('当前执行路径:', execPath, inte);
@@ -62,7 +63,7 @@ program
const [_interpreter, execPath] = process.argv;
const name = options.name;
const port = options.port;
let pm2Command = `pm2 start ${execPath} --name ${name} -- -s `;
let pm2Command = `pm2 start ${execPath} --interpreter ${options.interpreter} --name ${name} -- -s `;
if (port) {
pm2Command += ` -p ${port}`;
}