1.2.1 • Published 3 years ago

nestjs-aws-e v1.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

##Installation"

npm i nestjs-aws-e

##import

app.module.ts

import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AwsNestModule } from 'nestjs-aws-e';
@Module({
    imports: [
        AwsNestModule.forRootSnsAsync({
            useFactory: async () => {
                return {
                    accessKeyId: '',
                    secretAccessKey: '',
                    region: '',
                };
            },
            inject: [],
        }),
    ],
    controllers: [AppController],
    providers: [AppService],
})
export class AppModule {}

app.controller.ts

import { Controller, Get } from '@nestjs/common';
import { AwsSnsService } from 'nestjs-aws-e';
@Controller()
export class AppController {
  constructor(
    private awsSnsService: AwsSnsService,
  ) {}

  @Get('send-message')
  getSendMessage() {
    const params = {
      Message: 'Hooola' /* required */,
      TopicArn: '',
    };
    const v = this.awsSnsService.sendSNS(params);
    return v;
  }
}
1.2.0

3 years ago

1.1.0

3 years ago

1.2.1

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago