mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
38 lines
793 B
YAML
38 lines
793 B
YAML
service: aws-nodejs # NOTE: update this with your service name
|
|
|
|
provider:
|
|
name: aws
|
|
runtime: nodejs6.10
|
|
|
|
functions:
|
|
hello:
|
|
handler: handler.hello
|
|
events:
|
|
# paths without a slash
|
|
- http: POST without-slash
|
|
- http: GET without-slash
|
|
- http:
|
|
method: PUT
|
|
path: without-slash
|
|
- http:
|
|
method: DELETE
|
|
path: without-slash
|
|
# paths with a slash
|
|
- http: POST /with-slash
|
|
- http: GET /with-slash
|
|
- http:
|
|
method: PUT
|
|
path: /with-slash
|
|
- http:
|
|
method: DELETE
|
|
path: /with-slash
|
|
# root only paths
|
|
- http: POST /
|
|
- http: GET /
|
|
- http:
|
|
method: PUT
|
|
path: /
|
|
- http:
|
|
method: DELETE
|
|
path: /
|