-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserverless.yml
More file actions
81 lines (63 loc) · 1.49 KB
/
serverless.yml
File metadata and controls
81 lines (63 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
frameworkVersion: ">= 3"
service: lambda-examples
useDotenv: true
package:
patterns:
- '!src/**'
- '!**/node_modules/aws-sdk/**'
- '!**/node_modules/@types/**'
custom:
build: npm run ${env:SLS_BUILD, 'build'}
scriptHooks:
'deploy:function:initialize': ${self:custom.build}
'package:initialize': ${self:custom.build}
'invoke:local:loadEnvVars': ${self:custom.build}
stage: ${opt:stage, env:STAGE, self:provider.stage}
plugins:
- serverless-scriptable-plugin
provider:
name: aws
apiGateway:
shouldStartNameWithService: true
minimumCompressionSize: 1024
runtime: nodejs14.x
memorySize: 128
environment:
WEBHOOK_URL: ${env:WEBHOOK_URL}
functions:
TestGet:
handler: dist/handler/test/get.handle
events:
- http:
path: test
method: get
TestPost:
handler: dist/handler/test/post.handle
events:
- http:
path: test
method: post
TestPostYup:
handler: dist/handler/test/postYup.handle
events:
- http:
path: test/yup
method: post
TestPostYupDynamic:
handler: dist/handler/test/postYupDynamic.handle
events:
- http:
path: test/yup/dyn
method: post
TestPostStruct:
handler: dist/handler/test/postStruct.handle
events:
- http:
path: test/struct
method: post
TestCache:
handler: dist/handler/test/cache.handle
events:
- http:
path: test/cache
method: get