Skip to content

Commit 36c3cfa

Browse files
authored
docs(README): update usage for ESM
1 parent 8cef7fb commit 36c3cfa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ npm install @probot/adapter-aws-lambda-serverless
1212

1313
```javascript
1414
// handler.js
15-
const {
15+
import {
1616
createLambdaFunction,
1717
createProbot,
18-
} = require("@probot/adapter-aws-lambda-serverless");
19-
const appFn = require("./");
20-
module.exports.lambdaFn = createLambdaFunction(appFn, {
18+
} from "@probot/adapter-aws-lambda-serverless";
19+
import appFn from "./app.js";
20+
export const lambdaFn = createLambdaFunction(appFn, {
2121
probot: createProbot(),
2222
});
2323
```
@@ -29,7 +29,7 @@ You need to add [environment variables to configure Probot](https://probot.githu
2929
```yml
3030
provider:
3131
name: aws
32-
runtime: nodejs12.x
32+
runtime: nodejs22.x
3333
lambdaHashingVersion: 20201221
3434
environment:
3535
APP_ID: ${param:APP_ID}

0 commit comments

Comments
 (0)