refactor(monorepo): decouple api and webui into workspaces packages

This commit is contained in:
yiling
2026-06-01 23:35:00 +08:00
parent e3f4fa219e
commit 1f341c15d0
288 changed files with 18024 additions and 21178 deletions
+22
View File
@@ -0,0 +1,22 @@
import { loadEnvConfig } from '@shumai/core/src/env-loader'
loadEnvConfig(process.cwd(), process.env.NODE_ENV !== 'production')
const command = process.argv[2]
if (command === 'worker') {
const { run } = await import('./worker')
run().catch((err) => {
console.error(err)
process.exit(1)
})
} else {
// Default or 'serve' command
const { run } = await import('./serve')
run().catch((err) => {
console.error(err)
process.exit(1)
})
}
// Re-export AppType for frontend client.ts usage (type-only)
export type { AppType } from './serve'