Skip to content
This repository was archived by the owner on Jun 18, 2025. It is now read-only.
This repository was archived by the owner on Jun 18, 2025. It is now read-only.

Can't configure dbname or collection of database in nest-pulse config. #7

@cemusta

Description

@cemusta

Hi,

Can't set values of db name and collection name when creating a pulse module config.

  • There is no dbname property for setting the database name.
  • There is a collection property but it's not changing the default "job" collection.
export const pulseOptions: PulseModuleAsyncConfig<PulseModuleConfig> = {
  imports: [ConfigModule],
  useFactory: async (configService: ConfigService) => {
    const config: PulseModuleConfig = {
      db: {
        address: configService.getOrThrow<string>('JOB_DB_CONNECTION'),
        // dbname: mydbname, // this option is missing.
        collection: 'mycollection', // this option is not working.
        options: {
          appName: 'job-engine',
          retryWrites: true,
          writeConcern: {
            w: 'majority',
          },
        },
      },
    };
    return config;
  },
  inject: [ConfigService],
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions