1.0.9 • Published 10 months ago

@iceberg-dev/nest-sqs-consumer v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

nest-sqs-consumer

main.ts

async function bootstrap() {
  const { sqs } = config();
  const app = await NestFactory.createMicroservice<MicroserviceOptions>(
    AppModule,
    {
      strategy: new SQSServer({
        queueName: sqs.queueName,
        sqsClient: new SQSClient(sqs),
      }),
    },
  );
  await app.listen();
}

bootstrap();

cfg

Something like:

export const config = (): IConfig => ({
  port: parseInt(process.env.PORT, 10) || 8080,
  secret: process.env.SECRET_KEY,
  sqs: {
    queueName: process.env.QUEUE_NAME,
    region: process.env.EKS_REGION,
    credentials: {
      accessKeyId: process.env.SQS_ACCOUNT_ACCESS_KEY_ID,
      secretAccessKey: process.env.SQS_ACCOUNT_SECRET_ACCESS_KEY,
    },
  },
});
1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

11 months ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago