Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CodeGenieApp/serverless-express
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.3.9
Choose a base ref
...
head repository: CodeGenieApp/serverless-express
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.3.11
Choose a head ref
  • 10 commits
  • 16 files changed
  • 6 contributors

Commits on Jun 9, 2021

  1. chore(deps): Bump glob-parent in /examples/lambda-edge (#423)

    Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
    - [Release notes](https://github.com/gulpjs/glob-parent/releases)
    - [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
    - [Commits](gulpjs/glob-parent@v5.1.1...v5.1.2)
    
    ---
    updated-dependencies:
    - dependency-name: glob-parent
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 9, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9f33eb6 View commit details
  2. chore(deps): Bump glob-parent in /examples/basic-starter-api-gateway-…

    …v1 (#424)
    
    Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
    - [Release notes](https://github.com/gulpjs/glob-parent/releases)
    - [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
    - [Commits](gulpjs/glob-parent@v5.1.1...v5.1.2)
    
    ---
    updated-dependencies:
    - dependency-name: glob-parent
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 9, 2021
    Copy the full SHA
    06bac33 View commit details
  3. chore(deps): Bump glob-parent in /examples/basic-starter-api-gateway-…

    …v2 (#425)
    
    Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
    - [Release notes](https://github.com/gulpjs/glob-parent/releases)
    - [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
    - [Commits](gulpjs/glob-parent@v5.1.1...v5.1.2)
    
    ---
    updated-dependencies:
    - dependency-name: glob-parent
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 9, 2021
    Copy the full SHA
    8c148b0 View commit details
  4. chore(deps): Bump trim-newlines from 3.0.0 to 3.0.1 (#426)

    Bumps [trim-newlines](https://github.com/sindresorhus/trim-newlines) from 3.0.0 to 3.0.1.
    - [Release notes](https://github.com/sindresorhus/trim-newlines/releases)
    - [Commits](https://github.com/sindresorhus/trim-newlines/commits)
    
    ---
    updated-dependencies:
    - dependency-name: trim-newlines
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 9, 2021
    Copy the full SHA
    55c87df View commit details

Commits on Aug 28, 2021

  1. Copy the full SHA
    35db173 View commit details
  2. Copy the full SHA
    50f83d0 View commit details
  3. fix: fix for non-root proxy+

    Co-authored-by: selvendran.ayyaswamy <selvendran.ayyaswamy@toyota.com>
    selvendranayyaswamy and selvendran.ayyaswamy authored Aug 28, 2021
    3
    Copy the full SHA
    45edbfa View commit details
  4. chore(release): 4.3.10 [skip ci]

    ## [4.3.10](v4.3.9...v4.3.10) (2021-08-28)
    
    ### Bug Fixes
    
    * fix for non-root proxy+ ([45edbfa](45edbfa))
    semantic-release-bot committed Aug 28, 2021
    Copy the full SHA
    b06051c View commit details

Commits on Aug 31, 2021

  1. fix: revert #441 (#455)

    Revert to the old behavior of just routing on the proxy part.
    
    4.3.10 is a major breaking change for existing users depending on the current behavior.
    
    This will fix #454
    alexanderbh authored Aug 31, 2021
    Copy the full SHA
    87aa26f View commit details
  2. chore(release): 4.3.11 [skip ci]

    ## [4.3.11](v4.3.10...v4.3.11) (2021-08-31)
    
    ### Bug Fixes
    
    * revert [#441](#441) ([#455](#455)) ([87aa26f](87aa26f)), closes [#454](#454)
    semantic-release-bot committed Aug 31, 2021
    Copy the full SHA
    6adac65 View commit details
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [4.3.11](https://github.com/vendia/serverless-express/compare/v4.3.10...v4.3.11) (2021-08-31)


### Bug Fixes

* revert [#441](https://github.com/vendia/serverless-express/issues/441) ([#455](https://github.com/vendia/serverless-express/issues/455)) ([87aa26f](https://github.com/vendia/serverless-express/commit/87aa26f5395de9dc22591a817a476a006268fa73)), closes [#454](https://github.com/vendia/serverless-express/issues/454)

## [4.3.10](https://github.com/vendia/serverless-express/compare/v4.3.9...v4.3.10) (2021-08-28)


### Bug Fixes

* fix for non-root proxy+ ([45edbfa](https://github.com/vendia/serverless-express/commit/45edbfa79bac97ce3429dda68add5ee16ab45d5b))

## [4.3.9](https://github.com/vendia/serverless-express/compare/v4.3.8...v4.3.9) (2021-06-09)


36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -37,6 +37,40 @@ const app = require('./app')
exports.handler = serverlessExpress({ app })
```

## Async setup Lambda handler

If your application needs to perform some common bootstrap tasks such as connecting to a database before the request is forward to the API, you can use the following pattern (also available in [this example](https://github.com/vendia/serverless-express/blob/mainline/examples/basic-starter-api-gateway-v2/src/lambda-async-setup.js)):

```js
// lambda.js
require('source-map-support/register')
const serverlessExpress = require('@vendia/serverless-express')
const app = require('./app')

let serverlessExpressInstance

function asyncTask () {
return new Promise((resolve) => {
setTimeout(() => resolve('connected to database'), 1000)
})
}

async function setup (event, context) {
const asyncValue = await asyncTask()
console.log(asyncValue)
serverlessExpressInstance = serverlessExpress({ app })
return serverlessExpressInstance(event, context)
}

function handler (event, context) {
if (serverlessExpressInstance) return serverlessExpressInstance(event, context)

return setup(event, context)
}

exports.handler = handler
```

## 4.x

1. Improved API - Simpler for end-user to use and configure.
@@ -208,4 +242,4 @@ On 11/30, the AWS Serverless Express library moved from AWS to [Vendia](https://
We believe this is the best course of action to ensure that customers using this library get the best possible support in the future. To learn more about this move or become a maintainer of the new Serverless Express library, reach out to us through a GitHub issue on this repository.

Best,
The AWS Serverless team, Brett & the Vendia team
The AWS Serverless team, Brett & the Vendia team
Loading