diff --git a/packages/backend/server/src/core/selfhost/index.ts b/packages/backend/server/src/core/selfhost/index.ts index 58a780d170..0c559767e8 100644 --- a/packages/backend/server/src/core/selfhost/index.ts +++ b/packages/backend/server/src/core/selfhost/index.ts @@ -60,6 +60,11 @@ export class SelfhostModule implements OnModuleInit { onModuleInit() { const staticPath = join(this.config.projectRoot, 'static'); + // in command line mode + if (!this.adapterHost.httpAdapter) { + return; + } + const app = this.adapterHost.httpAdapter.getInstance(); const basePath = this.config.server.path;