Skip to content

Commit a901ced

Browse files
authored
Create README.md
1 parent 7748efd commit a901ced

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# AWS Lambda API Gateway Servlet
2+
3+
This util allows for mapping any HttpServletRequest and HttpServletResponse to and from API gateway classes
4+
5+
## Installation
6+
TODO
7+
8+
## Usage
9+
Example with javalin and aws lambda handler:
10+
```kotlin
11+
class HelloHandler : RequestHandler<APIGatewayProxyRequestEvent, APIGatewayProxyResponseEvent> {
12+
13+
companion object{
14+
val app = Javalin.createStandalone()
15+
app.get("/") { ctx -> ctx.result("Hello World") }
16+
}
17+
18+
override fun handleRequest(input: APIGatewayProxyRequestEvent, context: Context) = app.servlet().serve(input)
19+
}
20+
21+
```

0 commit comments

Comments
 (0)