feat(cli): add daemon mode and stop, logs, restart subcommands

This commit is contained in:
yiling
2026-06-20 12:37:49 +08:00
parent 3e122a86f0
commit 93b4656939
6 changed files with 502 additions and 94 deletions
+2 -1
View File
@@ -373,7 +373,8 @@ console.log(\`ℹ️ [${appName}] Running from CWD: \${process.cwd()}\`)
console.log(\`ℹ️ [${appName}] DATABASE_URL is: \${process.env.DATABASE_URL ? '(defined)' : '(undefined)'}\`)
const prismaSchemaPath = join(__dirname, '..', 'prisma', 'schema.prisma')
if (existsSync(prismaSchemaPath)) {
const isUtilityCommand = process.argv.includes('stop') || process.argv.includes('logs')
if (existsSync(prismaSchemaPath) && !isUtilityCommand) {
console.log('🔄 Running database migrations...')
activeProcess = spawn(
binaryPath,