Skip to content

Shorthand http event syntax throws "Cannot read property 'toLowerCase' of undefined" #44

@marcuswhybrow

Description

@marcuswhybrow

serverless-webpack 1.0.0-rc.2 at this line assumes a serverless.yml event format like this:

functions:
  myfunction:
    handler: handlers.myfunction
    events:
      - http:
          method: POST       # method and path are
          path: myfunction   # defined as separate keys

However using the http event string shorthand...

functions:
  myfunction:
    handler: handlers.myfunction
    events:
      - http: POST myfunction

...throws the error...

Cannot read property 'toLowerCase' of undefined
... serverless-webpack/lib/serve.js:45:40 ...

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