Skip to content

Commit

Permalink
Adds support for httpApi
Browse files Browse the repository at this point in the history
This patch adds support for the new httpApi that aws offers
for reducing cost and latency in serverless applications. It
has been supported for a while in serverless, this just adds
support here to match.

The approach is pretty straightforward so far and may not include
all of the functionality that httpApi permits so far. Those will
come in later patches to this pull request.
  • Loading branch information
designfrontier committed Mar 24, 2020
1 parent 3747af7 commit 9cb7029
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ServerlessOffline.js
Expand Up @@ -292,13 +292,13 @@ export default class ServerlessOffline {
const events = service.getAllEventsInFunction(functionKey)

events.forEach((event) => {
const { http, schedule, websocket } = event
const { http, httpApi, schedule, websocket } = event

if (http) {
if (http || httpApi) {
httpEvents.push({
functionKey,
handler: functionDefinition.handler,
http,
http: http || httpApi,
})
}

Expand Down

0 comments on commit 9cb7029

Please sign in to comment.