Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(server): runtime config overrides won't affect static startup (#7110)

forehalo622239fd4107
diff --git a/packages/backend/server/src/data/app.ts b/packages/backend/server/src/data/app.ts
index e8160dd702..552599137c 100644
--- a/packages/backend/server/src/data/app.ts
+++ b/packages/backend/server/src/data/app.ts
@@ -1,25 +1,11 @@
import { Module } from '@nestjs/common';
import { AppModule as BusinessAppModule } from '../app.module';
-import { ConfigModule } from '../fundamentals/config';
import { CreateCommand, NameQuestion } from './commands/create';
import { RevertCommand, RunCommand } from './commands/run';
@Module({
- imports: [
- ConfigModule.forRoot({
- doc: {
- manager: {
- enableUpdateAutoMerging: false,
- },
- },
- metrics: {
- enabled: false,
- customerIo: {},
- },
- }),
- BusinessAppModule,
- ],
+ imports: [BusinessAppModule],
providers: [NameQuestion, CreateCommand, RunCommand, RevertCommand],
})
export class CliAppModule {}
diff --git a/packages/backend/server/src/data/index.ts b/packages/backend/server/src/data/index.ts
index 75f1828c82..f9735c6e1a 100644
--- a/packages/backend/server/src/data/index.ts
+++ b/packages/backend/server/src/data/index.ts
@@ -4,6 +4,8 @@ import { Logger } from '@nestjs/common';
import { CommandFactory } from 'nest-commander';
async function bootstrap() {
+ AFFiNE.metrics.enabled = false;
+ AFFiNE.doc.manager.enableUpdateAutoMerging = false;
const { CliAppModule } = await import('./app');
await CommandFactory.run(CliAppModule, new Logger()).catch(e => {
console.error(e);