// index.ts
import { specify, Get, Query, StatusCode, SnakeCase } from "specify-lambda"
@Get()
export class Request {
@Query("username")
username: string;
}
@StatusCode(200)
export class Response {
@SnakeCase()
readonly body: {
readonly message: string
}
}
export const handler = specify(
Request,
Response,
)(async ({ username }) => {
const message = `Hello ${username || "world"}!`
return {
body: { message },
}
})
oh-jinsu/specify-lambda
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Write your explicit Lambda function
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published