Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.
This repository was archived by the owner on Aug 16, 2023. It is now read-only.

How to explicitly handle lambda request? #35

@mkliu

Description

@mkliu

So i know i could do

module.exports.googleHandler = googleActionApp

But i want to explicitly handle the call myself, so i could do something before the response is sent. Something like this:

module.exports.googleHandler = async function(event: any, context: any, callback: any) {
  if (!googleActionApp) {
      googleActionApp = createApp()
  }
  (googleActionApp as LambdaHandler)(event, context, callback)
}

I could see my handler's first method is starting to get called, but it always exits pre-maturally. Any suggestions?

Basically i want to flush logging before exit, if anyone know how to have a response middleware, it'll do the job too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions