I have one question about database connection in nestjs.

I used typeorm to connect postgres database as below.

  imports: [ConfigServiceModule],
  useFactory: (configService: ConfigService) => ({
    type: "postgres",
    timezone: "+0",
    entities: ["domain/entities/*.ts", "./dist/app/domain/entities/*.js"],
    synchronize: false,
    namingStrategy: new TypeOrmNamingStrategy(),
  inject: [ConfigService],

and then I realized nestjs is re-connecting automatically

although database server is rebooting.

(Isn’t typeormModule only executed once when an application is launched?)

Where can I find the source code for automatic connection?