Skip to content

Commit

Permalink
SLSCMN-13 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarman committed Dec 21, 2023
1 parent 9d325e6 commit 6efc6b8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/utils/MIDDYFY.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ Next, we need to _"middyfy"_ the handler function. This is just a fancy way of s
_/handlers/task-scheduled/index.ts_

```ts
import { Logger, middyfyScheduled } from '@leanstacks/serverless-common';
import { middyfyScheduled } from '@leanstacks/serverless-common';

import { handler } from './handler';

export const handle = middyfyScheduled({ handler, logger: Logger });
export const handle = middyfyScheduled({ handler });
```

## Creating a SNS event handler
Expand Down Expand Up @@ -203,11 +203,11 @@ Next, we need to _"middyfy"_ the handler function. This is just a fancy way of s
_/handlers/task-sns/index.ts_

```ts
import { Logger, middyfySNS } from '@leanstacks/serverless-common';
import { middyfySNS } from '@leanstacks/serverless-common';

import { handler } from './handler';

export const handle = middyfySNS({ handler, logger: Logger });
export const handle = middyfySNS({ handler });
```

The handler is wrapped with two middlewares.
Expand Down Expand Up @@ -262,11 +262,11 @@ Next, we need to _"middyfy"_ the handler function. This is just a fancy way of s
_/handlers/task-sqs/index.ts_

```ts
import { Logger, middyfySQS } from '@leanstacks/serverless-common';
import { middyfySQS } from '@leanstacks/serverless-common';

import { handler } from './handler';

export const handle = middyfySQS({ handler, logger: Logger });
export const handle = middyfySQS({ handler });
```

The handler is wrapped with two middlewares.
Expand Down Expand Up @@ -339,11 +339,11 @@ Next, we need to _"middyfy"_ the handler function. This is just a fancy way of s
_/handlers/task-lambda/index.ts_

```ts
import { Logger, middyfyLambda } from '@leanstacks/serverless-common';
import { middyfyLambda } from '@leanstacks/serverless-common';

import { handler } from './handler';

export const handle = middyfyLambda({ handler, logger: Logger });
export const handle = middyfyLambda({ handler });
```

The handler is wrapped with one middleware.
Expand Down

0 comments on commit 6efc6b8

Please sign in to comment.