bigsby
v1.9.4
Published
Bigsby is the newest NodeJS Lambda library on the block. Parsing, validation, auth, DI, versioning, hooks and more.
Downloads
169
Maintainers
Readme
Bigsby is the newest NodeJS Lambda library on the block. Written in Typescript, heavily leveraging decorators and classes, it might not be everyone's cup of 🫖, but its purpose is to 🧙🪄 away the heavy lifting and let you focus on the important stuff.
Show me some code
const bigsby = new Bigsby();
@Api()
class ArnyQuotesHandler implements ApiHandler {
@Autowire(ArnyService)
private service!: ArnyService;
@ReqSchema(requestSchema)
@ResSchema(200, responseSchema)
public async invoke(@Body() request: GetQuoteRequest): Promise<string> {
return this.service.getQuote(request.movie);
}
}
const handler = bigsby.createApiHandler(ArnyQuotesHandler);
Features
💉 Injection
Bigsby uses ts-injection under the hood to provide an easy to use, intuitive and clean dependency injection interface.
🔎 Parsing
Use a comprehensive set of decorators to map API Gateway events into the parameters your handler needs, resulting in concise, clean and easy to read code.
👮 Validation
Leveraging Joi's powerful schema description language, Bigsby makes it easy to define complex request and response schemas.
🔢 Versioning
Support for header or path based versioning is available out of the box with Bigsby. You define the mapping, and we'll worry about getting the request to the right handler version.
🔐 Authentication
Register authentication methods to secure your APIs. Assign these methods at the global level, to an individual handler, or even to a specific version of a handler.
🪝 Lifecycle
Tap into a diverse range of hooks exposed throughout Bigsby's request lifecycle. It's simple to build highly customizable execution flows.